ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Performance Monitoring » MQCMD_INQUIRE_Q_NAMES - Getting 2309 - example please :-)

Post new topic  Reply to topic
 MQCMD_INQUIRE_Q_NAMES - Getting 2309 - example please :-) « View previous topic :: View next topic » 
Author Message
spbrooks
PostPosted: Mon Jan 21, 2008 1:01 pm    Post subject: MQCMD_INQUIRE_Q_NAMES - Getting 2309 - example please :-) Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Performance Monitoring » MQCMD_INQUIRE_Q_NAMES - Getting 2309 - example please :-)
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.