|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQCMD_INQUIRE_Q_NAMES - Getting 2309 - example please :-) |
« View previous topic :: View next topic » |
Author |
Message
|
spbrooks |
Posted: Mon Jan 21, 2008 1:01 pm Post subject: MQCMD_INQUIRE_Q_NAMES - Getting 2309 - example please :-) |
|
|
Newbie
Joined: 21 Jan 2008 Posts: 1
|
Hi,
We're converting from MQ5 to MQ6, I'm converting our various programs that issue PCF commands to use the MQV6 APIs. All of our code that query queue attributes (MQCMD_INQUIRE_Q) convert and work fine with the new MQAI APIs, but I have some routines that need to get a list of all the queues that match a partial Q name and am getting 2309 when I'm using the MQCMD_INQUIRE_Q_NAMES in the MQExecute. Googling I can't find any examples, and trying different approaches seem to all result in 2309s. Here's the code that I'm using below:
mqCreateBag(MQCBO_ADMIN_BAG, &adminBag, &compCode, &reason);
mqCreateBag(MQCBO_ADMIN_BAG, &responseBag, &compCode, &reason);
mqAddString(adminBag, MQCA_Q_NAME, MQBL_NULL_TERMINATED, "QR.PROCESS_STATUS*", &compCode, &reason);
mqAddInteger(adminBag, MQIA_Q_TYPE, MQQT_REMOTE, &compCode, &reason);
mqExecute(hConn, MQCMD_INQUIRE_Q_NAMES,MQHB_NONE,adminBag,responseBag,MQHO_NONE,MQHO_NONE,&compCode,&reason);
if ( compCode == MQCC_OK ) {
mqCountItems(responseBag, MQHA_BAG_HANDLE, &numberOfBags, &compCode, &reason);
for ( i=0; i<numberOfBags; i++)
{
mqInquireItemInfo(responseBag, MQSEL_ANY_SELECTOR, i,&selector,&itemType,&compCode,&reason);
// THIS InquireItemInfo gives ITEMTYPE: MQITEM_INTEGER and selector: -8 ??
// trying the call below results in a 2309:
mqInquireString(responseBag, MQCA_Q_NAME, 0, MQ_Q_NAME_LENGTH, qName,
&qNameLength, NULL, &compCode, &reason);
// trying to get an attributes bag and Q_NAME also results in a 2309:
mqInquireBag(responseBag, MQHA_BAG_HANDLE, i, &qAttrsBag, &compCode, &reason);
mqInquireString(qAttrsBag, MQCA_Q_NAME, 0, MQ_Q_NAME_LENGTH, qName,&qNameLength, NULL, &compCode, &reason);
What code should I be using to get the list of remote queue names that start with QR.PROCESS_STATUS ?
Thanks VERY MUCH !!! |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|