Chapter 6 Reading Messages
Reading Messages - MQCIH
This section will describe how to read a message in a queue and how it will be displayed when it contains a MQCIH 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 MQCIH 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 ------------------------------
CICS Information Header:
Structure ID: CIH Version: 1
Header Length: 164 Format:
CCSID: 819 Encoding: 1
Flags: 0 Return Code: 0
Comp Code: 0 Reason: 0
UOW Control: 273 Get Wait Interval: -2
Link Type: 1 Output Data Length: -1
Facility Keep Time: 0 ADS Descriptor: 0
Conversational Task: 0 Task End Status: 0
Function: Facility: X'0000000000000000'
Abend Code: Authenticator:
Reply To Format: Remote SysId:
Remote TransId: TransactionId:
Facility Like: Attention Id:
Start Code: Cancel Code:
Next TransactionId: Cursor Position: 0
Error Offset: 0 Input Item: 0
Raw Data:
|
|