|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Diplaying Qs in a QM and deleting all the messages in a Q |
« View previous topic :: View next topic » |
Author |
Message
|
MRAhmed |
Posted: Wed Sep 03, 2003 9:34 am Post subject: Diplaying Qs in a QM and deleting all the messages in a Q |
|
|
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 |
|
 |
EddieA |
Posted: Wed Sep 03, 2003 9:44 am Post subject: |
|
|
 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 |
|
 |
MRAhmed |
Posted: Wed Sep 03, 2003 10:11 am Post subject: |
|
|
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 |
|
 |
EddieA |
Posted: Wed Sep 03, 2003 1:02 pm Post subject: |
|
|
 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 |
|
 |
MRAhmed |
Posted: Sun Sep 07, 2003 6:32 am Post subject: |
|
|
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 |
|
 |
EddieA |
Posted: Sun Sep 07, 2003 9:15 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|