0

I'm able to successfully connect to Queue Managers and pull back Queue data but I'm struggling getting the Queue filters working properly. I want to provide multiple exclude filters but it appears only to honour the last entry, even though the docs stipulate the filters are AND-joined. In my list below, the last entry is the only one that gets applied.

args = []
filters = []
ex_filters = [b'TEMP.IN.*', b'TEMP.OUT.*']

for filter_str in ex_filters:
    ex_filter = pymqi.Filter(pymqi.CMQC.MQCA_Q_NAME).not_like(filter_str)
    filters.append(ex_filter)

args.append(pymqi.CFST(Parameter=pymqi.CMQC.MQCA_Q_NAME, String=pymqi.ensure_bytes('*'))
args.append(pymqi.CFIN(Parameter=pymqi.CMQC.MQCA_Q_TYPE, Value=pymqi.CMQC.MQQT_LOCAL))

res = pcf.MQCMD_INQUIRE_Q(args, filters)

I have swapped the order of these round and it's only ever the last one that takes effect.

Remy
  • 49
  • 9

0 Answers0