Author |
Message
|
balaji sr |
Posted: Thu Nov 06, 2003 3:25 am Post subject: To get all the queue under a queue manager |
|
|
Apprentice
Joined: 07 Jan 2003 Posts: 28
|
Hi,
I have an requirment to get all the queue names under a queue manager thru a Java application. Please let me know how to proceed on this. |
|
Back to top |
|
 |
JasonE |
Posted: Thu Nov 06, 2003 4:28 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
Look at support pack MS0B (PCF classes for Java), if the qmgr supports a command server/pcf commands. You can send an inquire queue (*) type PCF command. |
|
Back to top |
|
 |
Anuradha Bose |
Posted: Thu Jan 08, 2004 9:08 pm Post subject: |
|
|
Newbie
Joined: 08 Jan 2004 Posts: 7
|
Hi
I have exactky the same problem. How to get all queue names under a queue manager. And also how to get all the queue names on a particular node? Please help. I serched thru all PCF commannd (MQINQ) and MQAI but could not find anything useful
thanks
a. bose |
|
Back to top |
|
 |
EddieA |
Posted: Thu Jan 08, 2004 10:26 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Take a look at the Programmable Command Formats and Administration Interface manual. http://publibfp.boulder.ibm.com/epubs/html/csqzac03/csqzac03tfrm.htm
The examples in the book, both for PCF and MQAI are exactly what you are asking for.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
JasonE |
Posted: Fri Jan 09, 2004 2:15 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
Here's sample dotnet (.NET) code which should be trivial to port to java for the PCF interface, and it queries all the SYS* queues.
PCFMessageAgent agent = new PCFMessageAgent("QM");
PCFMessage reqeuestMessage = new PCFMessage(CMQCFC.MQCMD_INQUIRE_Q_NAMES);
reqeuestMessage.AddParameter(MQC.MQCA_Q_NAME, "SYS*");
PCFMessage[] response;
response = agent.Send(reqeuestMessage);
string[] queueNames =
response[0].GetStringListParameterValue(CMQCFC.MQCACF_Q_NAMES);
for (int i = 0; i < queueNames.Length; i++) {
System.Console.WriteLine("Queue "+i+" : "+queueNames[i]);
} |
|
Back to top |
|
 |
Anuradha Bose |
Posted: Fri Jan 09, 2004 8:26 am Post subject: |
|
|
Newbie
Joined: 08 Jan 2004 Posts: 7
|
great!
I can get all queue names under a queue manager.
But I did not find in the doc. soemthing which will give me all queue managers on a particular node? Is there a way other than scanning directory structure? |
|
Back to top |
|
 |
JasonE |
Posted: Fri Jan 09, 2004 9:05 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
There is no programatic (eg. PCF) way of doing this, best way is to use the output of dspmq - Someone wrote a forum entry in the hints and tips or the FAQ forums recently about this. |
|
Back to top |
|
 |
prajiv |
Posted: Thu Dec 02, 2004 1:22 am Post subject: |
|
|
Newbie
Joined: 01 Dec 2004 Posts: 1
|
How can I get MQ Channel Status information in C# .Net |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Dec 02, 2004 6:28 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
|
Back to top |
|
 |
|