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 Performance Monitoring » Diplaying Qs in a QM and deleting all the messages in a Q

Post new topic  Reply to topic
 Diplaying Qs in a QM and deleting all the messages in a Q « View previous topic :: View next topic » 
Author Message
MRAhmed
PostPosted: Wed Sep 03, 2003 9:34 am    Post subject: Diplaying Qs in a QM and deleting all the messages in a Q Reply with quote

Newbie

Joined: 03 Sep 2003
Posts: 5

Hi,

Please consider me as newbie on MQSeries.

I need to display all the Q names in a QM. As per an earlier posting, we can use MQSC command(display queue(*) and its variants) and get the info. However, is there a way to invoke the command(s) from an application program (Say CICS/COBOL) and use the Q names later in the code?

Also, from an application program, is there a way to delete all the messages on a queue in one go? Looping a MQGET doesnt exactly seem to be a smart way of doing it.

Just to add the constraints - I cant use any third party tool/freeware/etc.

Many thanks in advance,
Riyaz.
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Sep 03, 2003 9:44 am    Post subject: Reply with quote

Jedi

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

There is also a Programmable Command Format interface which allows command messages to be sent to MQSeries and the replies received back at the application. There is also a command, CLEAR QLOCAL that can also be invoked via PCF.

Take a look at the PCF manual.

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
MRAhmed
PostPosted: Wed Sep 03, 2003 10:11 am    Post subject: Reply with quote

Newbie

Joined: 03 Sep 2003
Posts: 5

Thanks for a speedy response and apologies for not giving all the details earlier. I need to get the details on OS/390.

I think PCF is not supported on OS/390. Please confirm. I believe, there is something called system command input queue which can serve as an alternative for PCF on OS/390. Pointer to a sample code (CICS/COBOL) would be just excellent.

More thanks,
Riyaz.
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Sep 03, 2003 1:02 pm    Post subject: Reply with quote

Jedi

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

OK. I don't have a sample, but the technique is still the same, it's just the way it's implemented that is slighly different.

Instead of PCF formatted messages, you will be dealing with pure text. You send in the command as a text string, that looks just like the MQSC input. MQSeries then responds with text message(s) that look just like the output would do on SYSLOG. You have to parse these programatically. (And it's ugly. Believe me, I've done it for a Vendor product ).

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
MRAhmed
PostPosted: Sun Sep 07, 2003 6:32 am    Post subject: Reply with quote

Newbie

Joined: 03 Sep 2003
Posts: 5

Thanks for the directions. I reached as far as putting the MQSC command on the sys command i/p Q and getting the results on the reply to Q i.e. put 'DISPLAY QUEUE(*)' on the system command input q and get all the q names as a unique message in the reply to q.

But there is a hitch. I can get only the 'DISPLAY QUEUE(*)' command working. If I try to change it to something else I get error messages in the reply to q saying that there is a syntax error. I've tried the following combinations, none of them works:

'DISPLAY QLOCAL(*)'
'DISPLAY QUEUE(''MYQ*'')'
'DISPLAY QUEUE(MYQ*)'

What I want is the syntax for the MQSC command(on OS/390 using COBOL). What would be the syntax for getting generic Q names, their current depths and whether PUT or GET inhibited?

The command I want would be something like the one below:
'DISPLAY QUEUE(MYQ*) CURDEPTH,PUT,GET'

I hope this can be done. Can someone help?

Thanks,
Riyaz.
Back to top
View user's profile Send private message
EddieA
PostPosted: Sun Sep 07, 2003 9:15 am    Post subject: Reply with quote

Jedi

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

As far as I remember, the commands are identical to those that you would use at the console. So, if the command could be issued at the console, it can be sent through the command interface.

How are you doing this in COBOL. Do you just have a single PIC X field big enough to hold the command. If so, how are you building the command. Try changing the program to write to a different queue and then double check that the command is 100% correct. Maybe low-values (or garbage) have crept in between the 'words' instaead of spaces.

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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Performance Monitoring » Diplaying Qs in a QM and deleting all the messages in a Q
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.