MQPMR - Put-message record
Use the MQPMR structure to specify various message properties for a single destination when putting a message to a distribution list. MQPMR is an input/output structure for the MQPUT and MQPUT1 calls.
Availability
AIX®
IBM® i
Linux®
Windows
Character set and encoding
Data in MQPMR must be in the character set given by the CodedCharSetId queue manager attribute and encoding of the local queue manager given by MQENC_NATIVE. However, if the application is running as an 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 MQPUT or MQPUT1 call, you can specify different values for each destination queue in a distribution list. Some of the fields are input only, others are input/output.
PutMsgRecFields field in MQPMO. Fields that are present
must occur in the following order
:MsgIdCorrelIdGroupIdFeedbackAccountingToken
Fields that are absent occupy no space in the record.
Because MQPMR does not have a fixed layout, no definition of it is provided in the header, COPY,
and INCLUDE files for the supported programming languages. The application programmer must create a
declaration containing the fields that are required by the application, and set the flags in
PutMsgRecFields to indicate the fields that are present.
Fields
There are no initial values defined for this structure, as no structure declarations are provided in the header, COPY, and INCLUDE files for the supported programming languages. The sample declarations show how to declare the structure if all the fields are required.
| Field name | Field description |
|---|---|
| MsgId | Message identifier |
| CorrelId | Correlation identifier |
| GroupId | Group identifier |
| Feedback | Feedback or reason code |
| AccountingToken | Accounting token |
Language declarations
C declaration for MQPMR
typedef struct tagMQPMR MQPMR;
struct tagMQPMR {
MQBYTE24 MsgId; /* Message identifier */
MQBYTE24 CorrelId; /* Correlation identifier */
MQBYTE24 GroupId; /* Group identifier */
MQLONG Feedback; /* Feedback or reason code */
MQBYTE32 AccountingToken; /* Accounting token */
};
COBOL declaration for MQPMR
** MQPMR structure
10 MQPMR.
** Message identifier
15 MQPMR-MSGID PIC X(24).
** Correlation identifier
15 MQPMR-CORRELID PIC X(24).
** Group identifier
15 MQPMR-GROUPID PIC X(24).
** Feedback or reason code
15 MQPMR-FEEDBACK PIC S9(9) BINARY.
** Accounting token
15 MQPMR-ACCOUNTINGTOKEN PIC X(32).
PL/I declaration for MQPMR
dcl
1 MQPMR based,
3 MsgId char(24), /* Message identifier */
3 CorrelId char(24), /* Correlation identifier */
3 GroupId char(24), /* Group identifier */
3 Feedback fixed bin(31), /* Feedback or reason code */
3 AccountingToken char(32); /* Accounting token */
Visual Basic declaration for MQPMR
Type MQPMR
MsgId As MQBYTE24 'Message identifier'
CorrelId As MQBYTE24 'Correlation identifier'
GroupId As MQBYTE24 'Group identifier'
Feedback As Long 'Feedback or reason code'
AccountingToken As MQBYTE32 'Accounting token'
End Type