Chapter 6 Reading Messages
Reading Messages - Hex Data
This section will describe how to read a message from a queue that is formatted Hex format.
Purpose
Use the Read command to read messages in the queue.
Syntax
{mqbt or mqbt.sh} Read -a Path_and_FileName_for_CommProfileDB -p Profile_Name -q Queue_Name [-s Start_Position] [-c Message_Count] [-C] [-D] [-M] [-H] [-E]
Function Name:
Read
Required Parameters:
-a The full path and filename for a CommProfileDB.properties file.
-p The name of a profile contained in the CommProfileDB.properties file.
-q The name of the queue. (Note: Queue names are case sensitive.)
Optional Parameters:
-s Start position when getting messages from the queue. The default is 1.
-c Number of messages to be read from the queue. The default is all messages.
-C Convert on Get
-D Remove messages from the queue as they are read (destructive get).
-M Display the MQMD fields before display the message's data.
-H Display the message data in a hex format.
-E Display the message data in a hex format but the character convert to EBCDIC.
Example 1
Read all messages in Hex format from the queue.
Windows
mqbt Read -a c:\CommProfileDB.properties -p MQA1 -q TEST01.Q -H
Unix
./mqbt.sh Read -a /Capitalware/MQBT/CommProfileDB.properties -p MQA1 -q TEST01.Q -H
If the queue had 1 message, it may look like this (the message text begins after 'Hex Data:'):
------------------------------ Message # 1 ------------------------------
Hex Data:
00000000 54 68 69 73 20 69 73 20 61 20 74 65 73 74 20 6D 'This is a test m'
00000010 65 73 73 61 67 65 2E 0A 4C 69 6E 65 20 23 32 0A 'essage. Line #2 '
00000020 61 6E 64 20 74 68 65 20 6C 61 73 74 20 6C 69 6E 'and the last lin'
00000030 65 20 2D 20 23 33 0A 'e - #3 ' |
|