Author |
Message
|
mqdude70 |
Posted: Fri Nov 14, 2003 7:16 am Post subject: MQ commands |
|
|
 Apprentice
Joined: 13 Nov 2003 Posts: 28
|
Hi Guys,
I need the commands for finding all the queues that are bound to a queue manager, also to read/retrieve the messages from a queue on MQ in sun solaris. _________________ Thanks,
-MQdude70 |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Nov 14, 2003 7:37 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
You can use PCF command to inquire the list of queues on a queue manager. Check out the Inquire Queue Names command in the Programmable Command Formats and Administration Interface manual.
You can use the MQGET API call to get messages off of a queue. Take a look at the amqsget.c sample and the Application Programming Guide. |
|
Back to top |
|
 |
skn |
Posted: Fri Nov 14, 2003 7:59 am Post subject: |
|
|
 Centurion
Joined: 21 May 2003 Posts: 112 Location: Dallas
|
You might have to make changes to the buffer size in the amqsget.c depending on the size of your messages.It is only intended as a example ,so it cant handle really big messages. |
|
Back to top |
|
 |
mqdude70 |
Posted: Fri Nov 14, 2003 8:33 am Post subject: |
|
|
 Apprentice
Joined: 13 Nov 2003 Posts: 28
|
Thanks for the reply guys. I want to use the command in a shell script to enquire the queues available in a queue manager. Any examples will be helpful. _________________ Thanks,
-MQdude70 |
|
Back to top |
|
 |
mrlinux |
Posted: Fri Nov 14, 2003 8:52 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
you could do something like this to get queue names
echo "dis q(*)" | runmqsc QMGR_NAME _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
mqdude70 |
Posted: Fri Nov 14, 2003 9:39 am Post subject: |
|
|
 Apprentice
Joined: 13 Nov 2003 Posts: 28
|
Thanks Jeff ! I am able to see and parse the queue names. Can you provide me some commands to read the messages from the queue.
I appreciate it! _________________ Thanks,
-MQdude70 |
|
Back to top |
|
 |
vennela |
Posted: Fri Nov 14, 2003 9:59 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
to do a destructive get amqsbcg
To browse messages amqsbcg
Usage:
amqsput <QueueName> <QMGR name>
amqsbcg <QueueName> <QMGR name>
These sample executables should be found in <MQ Install dir>/samp/bin
Usually /opt/mqm/samp/bin
There are many more samples there |
|
Back to top |
|
 |
mqdude70 |
Posted: Fri Nov 14, 2003 10:26 am Post subject: |
|
|
 Apprentice
Joined: 13 Nov 2003 Posts: 28
|
Thanks vennella! _________________ Thanks,
-MQdude70 |
|
Back to top |
|
 |
mrlinux |
Posted: Fri Nov 14, 2003 10:50 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Well the ones I have to suggest have already been posted,
If want to use perl there is a good MQSeries module on CPAN.org. _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
|