<code>
pcfQmgr=queueManager.getConnectedPcfQueueManager()
attrs = {MQCA_Q_NAME :'*', MQIA_Q_TYPE : MQQT_ALIAS, MQIACF_Q_ATTRS : MQCA_Q_NAME}
f1 = pymqi.Filter(CMQC.MQCA_BASE_Q_NAME).equal('QL.BANANAS')
res = pcfQmgr.MQCMD_INQUIRE_Q(attrs, [f1])
</code>
The idea is that there's this new pymqi.Filter class which wraps all the gory inner details of how PCF/MQAI filters work. Please have a look at pymqi.FilterOperator.operator_mapping dictionary for more information on what operators are there.
Note that there can be multiple filters, they're all AND-combined, just like below:
Alright Rik, it's all ready in the lp:~pymqi-dev/pymqi/string-filter branch! Your code should now read:
<code> queueManager. getConnectedPcf QueueManager( ) CMQC.MQCA_ BASE_Q_ NAME).equal( 'QL.BANANAS' ) MQCMD_INQUIRE_ Q(attrs, [f1])
pcfQmgr=
attrs = {MQCA_Q_NAME :'*', MQIA_Q_TYPE : MQQT_ALIAS, MQIACF_Q_ATTRS : MQCA_Q_NAME}
f1 = pymqi.Filter(
res = pcfQmgr.
</code>
The idea is that there's this new pymqi.Filter class which wraps all the gory inner details of how PCF/MQAI filters work. Please have a look at pymqi.FilterOpe rator.operator_ mapping dictionary for more information on what operators are there.
Note that there can be multiple filters, they're all AND-combined, just like below:
<code>
import pymqi, CMQC, CMQCFC
queue_manager = 'QM01'
channel = 'SVRCONN.1'
host = '192.168.1.139'
port = '1434'
conn_info = '%s(%s)' % (host, port)
qmgr = pymqi.connect( queue_manager, channel, conn_info) e(qmgr)
pcf = pymqi.PCFExecut
attrs = {CMQC.MQCA_Q_NAME :'*', CMQC.MQIA_Q_TYPE : CMQC.MQQT_LOCAL, CMQCFC. MQIACF_ Q_ATTRS : CMQC.MQCA_Q_NAME}
f1 = pymqi.Filter( CMQC.MQCA_ Q_DESC) .like(' WebSphere MQ Selection*') CMQC.MQIA_ CURRENT_ Q_DEPTH) .greater( 2)
f2 = pymqi.Filter(
res = pcf.MQCMD_ INQUIRE_ Q(attrs, [f1, f2])
print(res)
</code>