+

Search Tips | Advanced Search

Interpreting the reply messages from the command server

Each request message correctly processed by IBM MQ produces at least two reply messages. Each reply message contains a single IBM 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 15 000 bytes in length.

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. For example:

CSQN205I    COUNT=    4, RETURN=0000000C, REASON=00000008

The 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 IBM MQ for z/OS messages, completion, and reason codes documentation for more details about the individual messages.

If we 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.

Parent topic: Writing programs to administer IBM MQ for z/OS

Last updated: 2020-10-04