MQRR (Response record) on IBM i

The MQRR structure is used to receive the completion code and reason code resulting from the open or put operation for a single destination queue, when the destination is a distribution list.


Overview

Purpose: MQRR is an output structure for the MQOPEN, MQPUT, and MQPUT1 calls.

Character set and encoding: Data in MQRR must be in the character set given by the CodedCharSetId queue manager attribute and encoding of the local queue manager given by ENNAT. However, if the application is running as an IBM MQ client, the structure must be in the character set and encoding of the client.

Usage: By providing an array of these structures on the MQOPEN and MQPUT calls, or on the MQPUT1 call, it is possible to determine the completion codes and reason codes for all of the queues in a distribution list when the outcome of the call is mixed, that is, when the call succeeds for some queues in the list but fails for others. Reason code RC2136 from the call indicates that the response records (if provided by the application) have been set by the queue manager.


Fields

The MQRR structure contains the following fields; the fields are described in alphabetical order:

    RRCC (10-digit signed integer)

    Completion code for queue.

    This is the completion code resulting from the open or put operation for the queue with the name that was specified by the corresponding element in the array of MQOR structures provided on the MQOPEN or MQPUT1 call.

    This is always an output field. The initial value of this field is CCOK.

    RRREA (10-digit signed integer)

    Reason code for queue.

    This is the reason code resulting from the open or put operation for the queue with the name that was specified by the corresponding element in the array of MQOR structures provided on the MQOPEN or MQPUT1 call.

    This is always an output field. The initial value of this field is RCNONE.


Initial values

Table 1. Initial values of fields in MQRR
Field name Name of constant Value of constant
RRCC CCOK 0
RRREA RCNONE 0


RPG declaration

     D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
     D*
     D* MQRR Structure
     D*
     D* Completion code for queue
     D  RRCC                   1      4I 0 INZ(0)
     D* Reason code for queue
     D  RRREA                  5      8I 0 INZ(0)