IBM GC34-5557-00 User Manual

Page of 127
Sending a Test Message
To put a test message on your queue use the supplied sample programs. For
example, to put messages to a queue called TEST.QUEUE, defined for a queue
manager called TEST.QMANAGER, enter the command:
CALL PGM(QMQM/AMQSPUT0) PARM(TEST.QUEUE TEST.QMANAGER)
You can now type a message (a simple character string is sufficient) and press
Enter to send the message to the queue. Press Enter again to return to a
command line.
To see the message on the queue, either:
v Browse the queue (see “Browsing Queues”), or
v Type CALL PGM(QMQM/AMQSGET4) PARM(TEST.QUEUE TEST.QMANAGER) on a
command line.
See “Appendix A. Sample MQI Programs” on page 99 for a list of the supplied
sample programs.
Browsing Queues
To browse the messages on a local queue called TEST.QUEUE, defined for a
queue manager called TEST.QMANAGER, use the following command:
WRKMQMMSG MQMNAME(TEST.QMANAGER) QNAME(TEST.QUEUE)
This command displays all messages on the queue, and allows you to view
the message contents.
Clearing a Local Queue
To delete all the messages on a local queue called TEST.QUEUE, defined for a
queue manager called TEST.QMANAGER, use the following command:
CLRMQMQ MQMNAME(TEST.QMANAGER) QNAME(TEST.QUEUE)
Deleting a Local Queue
To delete a local queue called TEST.QUEUE, defined for a queue manager
called TEST.QMANAGER, use the following command:
DLTMQMQ MQMNAME(TEST.QMANAGER) QNAME(TEST.QUEUE)
Note:
You must delete all messages from the queue using the CLRMQMQ
command before you can delete a queue.
Stopping a Queue Manager
There are two ways of quiescing a queue manager:
1.
Either use the command ENDMQM MQMNAME(QMGRNAME), where QMGRNAME is the
name of the queue manager, or
2.
Enter the command WRKMQM *ALL, enter option 6 (end) against the queue
manager name, and then press F4.
Working with MQSeries
Chapter 5. Using MQSeries for AS/400, V5.1
41