IBM MQ PCF command to collect QAlias details like Target base object name

浪尽此生 提交于 2019-12-10 12:16:26

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!