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 a list of Dynamic queue names

Post new topic  Reply to topic
 How to get a list of Dynamic queue names « View previous topic :: View next topic » 
Author Message
meriton
PostPosted: Sun Feb 15, 2004 10:05 pm    Post subject: How to get a list of Dynamic queue names Reply with quote

Novice

Joined: 07 Aug 2002
Posts: 24

We create a list of dynamic queues using Date and Business Type as part of the queue name, such as CLK.G2B.PHY.DEVL.ISS.20040216CCS* . When dynamic queues are processed, they are deleted. But if the process fail for whatever reason, how could we use the java inquire method to get a list of the names of the queues left over? it will be very helpful if some code can be providied provided.
Back to top
View user's profile Send private message
bower5932
PostPosted: Mon Feb 16, 2004 6:52 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Go look at SupportPac MS0B (java PCFs) and check out the sample program ListQueueNames.java. This program uses PCF messages to get a list of queue names.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
chaian
PostPosted: Thu Feb 26, 2004 6:48 am    Post subject: pcf Reply with quote

Novice

Joined: 30 Sep 2003
Posts: 14
Location: Italy

Yes, but PCF doesn't work if you need a list o queues from host.
I learned it kicking my head against the 3001 code error
Back to top
View user's profile Send private message MSN Messenger
RogerLacroix
PostPosted: Thu Feb 26, 2004 9:15 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

If by "host" you mean OS/390 or z/OS then true, you cannot use PCF. You need to send "Plain Text" commands to the command server.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
chaian
PostPosted: Mon Mar 01, 2004 6:24 am    Post subject: Reply with quote

Novice

Joined: 30 Sep 2003
Posts: 14
Location: Italy

A snippet of code is more powerful of hundreds posts :

[...]
int openOptions = MQC.MQOO_OUTPUT;

MQMessage message = new MQMessage();
MQQueueManager mqqm = new MQQueueManager("<YOUR_QMANAGER>");

String commandQueue = mqqm.getCommandInputQueueName();
String replyQueue = "SYSTEM.DEFAULT.LOCAL.QUEUE";

/* This is the core part of the code
Quote:
You need to send "Plain Text" commands to the command server.
*/

String command = "DISPLAY QUEUE(*) ALL";

MQQueue q = mqqm.accessQueue(commandQueue,openOptions);
message.replyToQueueName = replyQueue;
message.messageType = MQC.MQMT_REQUEST;
message.format = MQC.MQFMT_STRING;
byte[] b = command.getBytes();
message.write(b);
MQPutMessageOptions pmo = new MQPutMessageOptions();
message.messageId = MQC.MQMI_NONE;
q.put(message , pmo);
byte[] messageID = message.messageId;
q.close();
openOptions = MQC.MQOO_INPUT_AS_Q_DEF;
MQQueue rq = mqqm.accessQueue(replyQueue,openOptions);
/*
* this method retrieves response messages from reply queue,
* it uses the messageId to match the correlationId of the response
* messages
*/
ret = getCmqMessages(rq, message.messageId);
[...]
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » How to get a list of Dynamic queue names
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.