Author |
Message
|
from_tindi |
Posted: Mon Mar 06, 2006 6:32 pm Post subject: How to get all queues for a QueueManager without PCF |
|
|
Newbie
Joined: 06 Mar 2006 Posts: 5
|
Hi,
Is there a way to get the list of queue names for a QueueManager without using PCF? PCF package is not available in our environment. Is it possible to use the MQCMD_INQUIRE_Q_NAMES in a java program to get the list of Queue names?
Thanks for your help. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Mar 06, 2006 8:53 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Why make it so difficult. You did not say it had to be programatical ... but anyway how about:
Code: |
echo "dis q(*)" | runmqsc MYQMGR |
run by a user in the mqm group...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
wschutz |
Posted: Tue Mar 07, 2006 2:42 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
PCF package is not available in our environment. |
The only environment PCF wasn't availavle was zOS (pre V6)...is that the environment you're in? If so, you can still send "plain text" command messages to the command server...
Otherwise, FJ's solution is the best, but it only works if you're local to the qmgr ... (although I thought Paul C have a s/p for "remote" runmqsc...) _________________ -wayne |
|
Back to top |
|
 |
from_tindi |
Posted: Tue Mar 07, 2006 6:57 am Post subject: |
|
|
Newbie
Joined: 06 Mar 2006 Posts: 5
|
Hi All,
Thanks for the reply.
We are still in 5.3 environment. The requirement is for a Java program to retrieve the list of queue names for a given Queue Manager. Is there a way to retrieve the queue names from a Java program in a non-PCF environment?
I tried sending messages to the command queue to display all the queues using a Java program. But the message I sent just sits in the Command Queue meaning its not executed.
Thanks for your help.
wschutz wrote: |
Quote: |
PCF package is not available in our environment. |
The only environment PCF wasn't availavle was zOS (pre V6)...is that the environment you're in? If so, you can still send "plain text" command messages to the command server...
Otherwise, FJ's solution is the best, but it only works if you're local to the qmgr ... (although I thought Paul C have a s/p for "remote" runmqsc...) |
|
|
Back to top |
|
 |
wschutz |
Posted: Tue Mar 07, 2006 7:06 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
But the message I sent just sits in the Command Queue meaning its not executed.
|
Is the command server running? "dspmqcsv qmgr" ? if not, start it: strmqcsv .... _________________ -wayne |
|
Back to top |
|
 |
wschutz |
Posted: Tue Mar 07, 2006 7:09 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Mar 07, 2006 6:22 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
from_tindi wrote: |
Is there a way to retrieve the queue names from a Java program in a non-PCF environment? |
The only cases where it's really a good idea to get a list of queues on a queue manager is if you are writing a monitoring or management solution.
It is an extremely bad idea to write a business application that reads the list of queues on a qm, and picks one to use for it's business logic. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
from_tindi |
Posted: Wed Mar 08, 2006 7:17 pm Post subject: |
|
|
Newbie
Joined: 06 Mar 2006 Posts: 5
|
We are trying to create a web application to monitor queues for a queue manager. Right now we have the list of queues read from a file but we are trying to replace it with code to dynamically retrieve queue list for a given queue manager.
jefflowrey wrote: |
from_tindi wrote: |
Is there a way to retrieve the queue names from a Java program in a non-PCF environment? |
The only cases where it's really a good idea to get a list of queues on a queue manager is if you are writing a monitoring or management solution.
It is an extremely bad idea to write a business application that reads the list of queues on a qm, and picks one to use for it's business logic. |
|
|
Back to top |
|
 |
wschutz |
Posted: Thu Mar 09, 2006 2:23 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
so where does this stand... ??
can you answer my previous questions.... _________________ -wayne |
|
Back to top |
|
 |
from_tindi |
Posted: Fri Mar 17, 2006 5:07 pm Post subject: |
|
|
Newbie
Joined: 06 Mar 2006 Posts: 5
|
The QueueManagers belong to a different group which will not allow us running any command on them. The only option we have is to get the list of queues using MQ Java API. We do not have PCF in our environment and so Im unable to use it.
Thanks for your help.
wschutz wrote: |
so where does this stand... ??
can you answer my previous questions.... |
|
|
Back to top |
|
 |
wschutz |
Posted: Fri Mar 17, 2006 8:04 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
We do not have PCF in our environment and so Im unable to use it.
|
That doesn't make any sense ... with the exception of zOS qmgrs before V6, ALL qmgrs support pcf ...can you explain exactly what you mean by this? _________________ -wayne |
|
Back to top |
|
 |
fschofer |
Posted: Sat Mar 18, 2006 3:12 pm Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Quote: |
The QueueManagers belong to a different group which will not allow us running any command on them. |
Probably they do not have the rights to access the SYSTEM.ADMIN.COMMAND.QUEUE, so its not possible to send PCF commands. |
|
Back to top |
|
 |
from_tindi |
Posted: Mon Mar 20, 2006 5:16 pm Post subject: |
|
|
Newbie
Joined: 06 Mar 2006 Posts: 5
|
Yes. We do not have the rights to access the command queue.
fschofer wrote: |
Quote: |
The QueueManagers belong to a different group which will not allow us running any command on them. |
Probably they do not have the rights to access the SYSTEM.ADMIN.COMMAND.QUEUE, so its not possible to send PCF commands. |
|
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Mar 20, 2006 5:20 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
from_tindi wrote: |
Yes. We do not have the rights to access the command queue. |
Then you are out of luck. There is no way to get a list of all the queues strictly thru the MQ API from the QM, unless you go thru the command queue. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Mar 20, 2006 5:36 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Weeeelllll.... a queue name is at most 48 characters long, with each character being one of (A-Za-z0-9/.%_<space>). That means one could write a program that would issue an MQOPEN for each 67^48 possibilities. It's a little bit smaller than that, as spaces are forced to only be trailing characters, not leading or embedded characters. So it's really 66^48 possibilites - with spaces added to any possibility that is less than 48 characters long.
And ... eventually one would arrive at a list of queue names. But I wouldn't hold my breath.
Can someone remind me how reliable MQINQ is compared to PCF? I seem to remember that it was not quite as guaranteed? That is, the data is not going to be as accurate - and it's more limited too. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|