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 API Support » Using PCF to list queues of several types

Post new topic  Reply to topic
 Using PCF to list queues of several types « View previous topic :: View next topic » 
Author Message
ZlenkD
PostPosted: Mon Apr 18, 2005 12:43 pm    Post subject: Using PCF to list queues of several types Reply with quote

Newbie

Joined: 18 Apr 2005
Posts: 2
Location: Harrisburg, PA

I know there have been numerous inquiries about listing queues on a given queue manager but a search did not yield an answer to my specific question.

If I want to use PCF to resolve all queue names I enter the string "*" in this context as a PCFParameter:
new MQCFST (CMQC.MQCA_Q_NAME, "*")
Basically, I want to do the same thing to list all queue types, of course it wants an integer so the "*" string would not be applicable. I thought I would be able to substitute this line:
new MQCFIN (CMQC.MQIA_Q_TYPE, CMQC.MQQT_LOCAL),
with this code:
new MQCFIN (CMQC.MQIA_Q_TYPE, CMQC.MQQT_LOCAL|CMQC.MQQT_REMOTE)
to list the local and remote queues, but that did not work. Omitting this parameter only returns local queues. If there is anyway to do this let me know. For reference I included the code snippet where the above code fits into. TIA
Code:

PCFAgent    agent;
   int [] attrs =
                {
   CMQC.MQCA_Q_NAME,
   CMQC.MQIA_CURRENT_Q_DEPTH
   };
   PCFParameter [] parameters =
                {
   new MQCFST (CMQC.MQCA_Q_NAME, "*"),
   new MQCFIN (CMQC.MQIA_Q_TYPE, CMQC.MQQT_LOCAL),
   new MQCFIL (CMQCFC.MQIACF_Q_ATTRS, attrs)
   };
   agent = new PCFAgent (host, port, channel);
   responses = agent.send(CMQCFC.MQCMD_INQUIRE_Q, parameters);
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon Apr 18, 2005 1:07 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Did you even bother looking in the PCF Manual. MQQT_ALL.

Also, I would check your code, because the default if Q_TYPE is not supplied is MQQT_ALL.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
clindsey
PostPosted: Mon Apr 18, 2005 1:09 pm    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

Looks like those fields were not designed to be OR'ed. They are not bit fields. MQQT_LOCAL = 1, MQQT_REMOTE = 6. ORing this together yields 7 which is MQQT_CLUSTER so you definitely do not get what you are after.

I had a similar problem is trying to use regular expressions to get a list of the queue names, but anything after the * is ignored. You can do ABC* but not *ABC. I ended up getting the list using * and then applying my own matchstrings to the returned list to filter out what I wanted. You could do the same and include the attribute MQQT_ALL and then discard the results that do not match the types you are looking for.

I know that is not what you are looking for but it will work.

Charlie
Back to top
View user's profile Send private message
ZlenkD
PostPosted: Mon Apr 18, 2005 1:37 pm    Post subject: Reply with quote

Newbie

Joined: 18 Apr 2005
Posts: 2
Location: Harrisburg, PA

Sorry Eddie, I overlooked the MQQT_ALL constant. Thanks for pointing out the default behavior was MQQT_ALL as I found a bug that was making it appear the remote queues were not being resolved.
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 API Support » Using PCF to list queues of several types
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.