Chapter 6 Reading Messages
Reading Messages - MQHSAP
This section will describe how to read a message in a queue and how it will be displayed when it contains a MQHSAP header.
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 with MQHSAP header from the queue.
Windows
mqbt Read -a c:\CommProfileDB.properties -p MQA1 -q TEST01.Q
Unix
./mqbt.sh Read -a /Capitalware/MQBT/CommProfileDB.properties -p MQA1 -q TEST01.Q
If the queue had 1 message, it may look like this:
------------------------------ Message # 1 ------------------------------
SAP Header:
Structure ID: SAPH Version: 1
Header Length: 108 Format: MQSTR
CCSID: 1200 Encoding: 273
Flags: 0 Client:
Language: Hostname:
User ID: Password:
System Number: 00
Raw Data:
EDI_DC40 46C 6422 ABC_PO_DOC01 ABC_PO
SAPIR1 LS ROMEOINT
SAPIR1 LS IR1CLNT310
ABC2_PO_HEAD01000 00000100000001L011ROMEOINT
ABC_PO DK11 200506CPH-002946-01
00041036681 DKK DK01070
ABC2_PO_LINE01000 00000200000102L0117DK4 10020010 1007BLL 010
**********DGASTHODÈRNDORF 58 000001100.00 00000000001.00 EA Z442050820SPACE |
|