问题
I was looking to see if there are ways to collect MQ object details other than names using PCF commands. For E.g. If I would like see where a QAlias is pointing to or the Target base object, how do I generate a PCF command to accomplish this??
回答1:
Use the information in the link that Morag gave you and then you need to do something like:
agent = new PCFMessageAgent(qMgrName);
request = new PCFMessage(MQConstants.MQCMD_INQUIRE_Q);
request.addParameter(MQConstants.MQCA_Q_NAME, "*");
request.addParameter(MQConstants.MQIA_Q_TYPE, MQConstants.MQQT_ALIAS);
request.addParameter(MQConstants.MQIACF_Q_ATTRS,
new int [] { MQConstants.MQCA_Q_NAME, MQConstants.MQCA_BASE_NAME });
responses = agent.send (request);
回答2:
There are PCF commands that are equivalents of all the MQSC commands. So if you can do it with MQSC you can also achieve the same thing with PCF.
The MQSC command DISPLAY QALIAS(q-name) ALL
can be done in PCF using the Inquire Queue command - that is MQCMD_INQUIRE_Q
and providing the name of the queue you want to know about in the Queue Name MQCA_Q_NAME
parameter. You can see all the returned parameters in the Knowledge Center.
Reference
- Inquire Queue PCF Command
来源:https://stackoverflow.com/questions/36232494/ibm-mq-pcf-command-to-collect-qalias-details-like-target-base-object-name