Use the MQPMR structure
This structure is optional and gives destination-specific information for some fields that you might want to identify differently from those already identified in the MQMD. For a description of these fields, see the Application Programming Reference.
The content of each record depends on the information given in the PutMsgRecFields field of the MQPMO. For example, in the sample program AMQSPTL0.C (see The Distribution List sample program for a description) showing the use of distribution lists, the sample chooses to provide values for MsgId and CorrelId in the MQPMR. This section of the sample program looks like this:
typedef struct { MQBYTE24 MsgId; MQBYTE24 CorrelId; } PutMsgRec;… /********************** MQLONG PutMsgRecFields=MQPMRF_MSG_ID | MQPMRF_CORREL_ID;This implies that MsgId and CorrelId are provided for each destination of a distribution list. The Put Message Records are provided as an array.
Figure 1 shows how we can put a message to a distribution list in C.
Figure 1. Putting a message to a distribution list in C. The MQPMO uses pointers to the MQPMR and MQRR structures.
Figure 2 shows how we can put a message to a distribution list in COBOL.
Figure 2. Putting a message to a distribution list in COBOL. The MQPMO uses offsets in COBOL.
Parent topic:
Putting messages to a distribution list
fg12510_