MQDH - Distribution header
Availability
- AIX®
- IBM® i
- Linux®
- Solaris
- Windows
Format name
MQFMT_DIST_HEADER
Character set and encoding
Data in MQDH must be in the character set given by the CodedCharSetId queue manager attribute and encoding of the local queue manager given by MQENC_NATIVE.
CodedCharSetId
and Encoding
fields in:- The MQMD (if the MQDH structure is at the start of the message data), or
- The header structure that precedes the MQDH structure (all other cases).
Usage
- MQXQH structure
- MQDH structure plus arrays of MQOR and MQPMR records
- Application message data
Depending on the destinations, the queue manager can generate more than one such message, and place it on different transmission queues. In this case, the MQDH structures in those messages identify different subsets of the destinations defined by the distribution list opened by the application.
An application that puts a distribution-list message directly on a transmission queue must conform to the sequence described earlier, and must ensure that the MQDH structure is correct. If the MQDH structure is not valid, the queue manager can fail the MQPUT or MQPUT1 call with reason code MQRC_DH_ERROR.
You can store messages on a queue in distribution-list form only if you have defined the queue as being able to support distribution list messages. See the DistLists queue attribute described in Attributes for queues. If an application puts a distribution-list message directly on a queue that does not support distribution lists, the queue manager splits the distribution list message into individual messages, and places those on the queue instead.
Fields
Field name and description | Name of constant | Initial value (if any) of constant |
---|---|---|
StrucId (structure identifier) | MQDH_STRUC_ID | 'DH¬¬' |
Version (structure version number) | MQDH_VERSION_1 | 1 |
StrucLength (length of MQDH structure plus following records) | None | 0 |
Encoding (numeric encoding of data that follows array of MQPMR records) | None | 0 |
CodedCharSetId (character set identifier of data that follows array of MQPMR records) | MQCCSI_UNDEFINED | 0 |
Format (format name of data that follows array of MQPMR records) | MQFMT_NONE | Blanks |
Flags (general flags) | MQDHF_NONE | 0 |
PutMsgRecFields (flags indicating which MQPMR fields are present) | MQPMRF_NONE | 0 |
RecsPresent (number of object records present) | None | 0 |
ObjectRecOffset (offset of first object record from start of MQDH) | None | 0 |
PutMsgRecOffset (offset of first put-message record from start of MQDH) | None | 0 |
Notes:
|
Language declarations
C declaration for MQDH
typedef struct tagMQDH MQDH;
struct tagMQDH {
MQCHAR4 StrucId; /* Structure identifier */
MQLONG Version; /* Structure version number */
MQLONG StrucLength; /* Length of MQDH structure plus following
MQOR and MQPMR records */
MQLONG Encoding; /* Numeric encoding of data that follows
the MQOR and MQPMR records */
MQLONG CodedCharSetId; /* Character set identifier of data that
follows the MQOR and MQPMR records */
MQCHAR8 Format; /* Format name of data that follows the
MQOR and MQPMR records */
MQLONG Flags; /* General flags */
MQLONG PutMsgRecFields; /* Flags indicating which MQPMR fields are
present */
MQLONG RecsPresent; /* Number of MQOR records present */
MQLONG ObjectRecOffset; /* Offset of first MQOR record from start
of MQDH */
MQLONG PutMsgRecOffset; /* Offset of first MQPMR record from start
of MQDH */
};
COBOL declaration for MQDH
** MQDH structure
10 MQDH.
** Structure identifier
15 MQDH-STRUCID PIC X(4).
** Structure version number
15 MQDH-VERSION PIC S9(9) BINARY.
** Length of MQDH structure plus following MQOR and MQPMR records
15 MQDH-STRUCLENGTH PIC S9(9) BINARY.
** Numeric encoding of data that follows the MQOR and MQPMR records
15 MQDH-ENCODING PIC S9(9) BINARY.
** Character set identifier of data that follows the MQOR and MQPMR
** records
15 MQDH-CODEDCHARSETID PIC S9(9) BINARY.
** Format name of data that follows the MQOR and MQPMR records
15 MQDH-FORMAT PIC X(8).
** General flags
15 MQDH-FLAGS PIC S9(9) BINARY.
** Flags indicating which MQPMR fields are present
15 MQDH-PUTMSGRECFIELDS PIC S9(9) BINARY.
** Number of MQOR records present
15 MQDH-RECSPRESENT PIC S9(9) BINARY.
** Offset of first MQOR record from start of MQDH
15 MQDH-OBJECTRECOFFSET PIC S9(9) BINARY.
** Offset of first MQPMR record from start of MQDH
15 MQDH-PUTMSGRECOFFSET PIC S9(9) BINARY.
PL/I declaration for MQDH
dcl
1 MQDH based,
3 StrucId char(4), /* Structure identifier */
3 Version fixed bin(31), /* Structure version number */
3 StrucLength fixed bin(31), /* Length of MQDH structure plus
following MQOR and MQPMR
records */
3 Encoding fixed bin(31), /* Numeric encoding of data that
follows the MQOR and MQPMR
records */
3 CodedCharSetId fixed bin(31), /* Character set identifier of data
that follows the MQOR and MQPMR
records */
3 Format char(8), /* Format name of data that follows
the MQOR and MQPMR records */
3 Flags fixed bin(31), /* General flags */
3 PutMsgRecFields fixed bin(31), /* Flags indicating which MQPMR
fields are present */
3 RecsPresent fixed bin(31), /* Number of MQOR records present */
3 ObjectRecOffset fixed bin(31), /* Offset of first MQOR record from
start of MQDH */
3 PutMsgRecOffset fixed bin(31); /* Offset of first MQPMR record from
start of MQDH */
Visual Basic declaration for MQDH
Type MQDH
StrucId As String*4 'Structure identifier'
Version As Long 'Structure version number'
StrucLength As Long 'Length of MQDH structure plus following'
'MQOR and MQPMR records'
Encoding As Long 'Numeric encoding of data that follows'
'the MQOR and MQPMR records'
CodedCharSetId As Long 'Character set identifier of data that'
'follows the MQOR and MQPMR records'
Format As String*8 'Format name of data that follows the'
'MQOR and MQPMR records'
Flags As Long 'General flags'
PutMsgRecFields As Long 'Flags indicating which MQPMR fields are'
'present'
RecsPresent As Long 'Number of MQOR records present'
ObjectRecOffset As Long 'Offset of first MQOR record from start'
'of MQDH'
PutMsgRecOffset As Long 'Offset of first MQPMR record from start'
'of MQDH'
End Type