The Browser sample program is written as a utility not just to demonstrate a technique. It reads and writes out both the message descriptor and the message content fields of all the messages on a queue. See Features demonstrated in the sample programs for the names of these programs.
This program takes 2 parameters:
Both input parameters for this program are mandatory. For example, enter one of the following:
amqsbcg myqueue qmanagername
amqsbcgc myqueue qmanagername
where myqueue is the name of the queue on which the messages are going to be browsed, and qmanagername is the queue manager that owns myqueue.
It reads each message from the queue and writes the following to stdout:
Formatted message descriptor fields
Message data (dumped in hex and, where possible, character format)
The program is restricted to printing the first 32767 characters of the message, and will fail with the reason 'truncated msg' if a longer message is read.
See the System Management Guide for your platform, for examples of the output from this utility.