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 Java / JMS » How to get all queues for a QueueManager without PCF

Post new topic  Reply to topic Goto page 1, 2  Next
 How to get all queues for a QueueManager without PCF « View previous topic :: View next topic » 
Author Message
from_tindi
PostPosted: Mon Mar 06, 2006 6:32 pm    Post subject: How to get all queues for a QueueManager without PCF Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Mar 06, 2006 8:53 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
wschutz
PostPosted: Tue Mar 07, 2006 2:42 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
from_tindi
PostPosted: Tue Mar 07, 2006 6:57 am    Post subject: Reply with quote

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
View user's profile Send private message
wschutz
PostPosted: Tue Mar 07, 2006 7:06 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
wschutz
PostPosted: Tue Mar 07, 2006 7:09 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Quote:
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.
and I hope you're using support pac MS0b:
http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg24000668&loc=en_US&cs=utf-8&lang=en
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
jefflowrey
PostPosted: Tue Mar 07, 2006 6:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
from_tindi
PostPosted: Wed Mar 08, 2006 7:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
wschutz
PostPosted: Thu Mar 09, 2006 2:23 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
from_tindi
PostPosted: Fri Mar 17, 2006 5:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
wschutz
PostPosted: Fri Mar 17, 2006 8:04 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
fschofer
PostPosted: Sat Mar 18, 2006 3:12 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
from_tindi
PostPosted: Mon Mar 20, 2006 5:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
PeterPotkay
PostPosted: Mon Mar 20, 2006 5:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Mon Mar 20, 2006 5:36 pm    Post subject: Reply with quote

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

MQSeries.net Forum Index » IBM MQ Java / JMS » How to get all queues for a QueueManager without PCF
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.