interpreting replies to WebSphere MQ commands, messages, COUNT field, user messages" />
Interpreting the replies
Start of Product-sensitive programming interface information
Each request message correctly processed by WebSphere MQ produces at least two reply messages. Each reply message contains a single WebSphere MQ user message.
The length of a reply depends on the command that was issued. The longest reply we can get is from a DISPLAY NAMELIST, and that can be up to 13 000 bytes long.
The first user message, CSQN205I, always contains:
- A count of the replies (in decimal), which we can use as a counter in a loop to get the rest of the replies. The count includes this first message.
- The return code from the command preprocessor.
- A reason code, which is the return code from the command processor.
This message does not contain a CPF.
CSQN205I COUNT= 4, RETURN=0000000C, REASON=00000008The COUNT field is 8 bytes long and is right-justified. It always starts at position 18, that is, immediately after 'COUNT='. The RETURN field is 8 bytes long in character hexadecimal and is immediately after 'RETURN=' at position 35. The REASON field is 8 bytes long in character hexadecimal and is immediately after 'REASON=' at position 52.
If the RETURN= value is 00000000 and the REASON= value is 00000004, the set of reply messages is incomplete. After retrieving the replies indicated by the CSQN205I message, issue a further MQGET call to wait for a further set of replies. The first message in the next set of replies is again CSQN205I, indicating how many replies there are, and whether there are still more to come.
See the WebSphere MQ for z/OS Messages and Codes manual for more details about the individual messages.
If you are using a non-English language feature, the text and layout of the replies are different from those shown here. However, the size and position of the count and return codes in message CSQN205I are the same.