Overview

Purpose: The MQXQH structure describes the information that is prefixed to the application message data of messages when they are on transmission queues. A transmission queue is a special type of local queue that temporarily holds messages destined for remote queues (that is, destined for queues that do not belong to the local queue manager). A transmission queue is denoted by the Usage queue attribute having the value USTRAN.

Format name: FMXQH.

Character set and encoding: Data in MQXQH must be in the character set and encoding of the local queue manager; these are given by the CodedCharSetId queue manager attribute and ENNAT for the C programming language, respectively.

The character set and encoding of the MQXQH must be set into the MDCSI and MDENC fields in:

Usage: A message that is on a transmission queue has two message descriptors:

Fields in the separate message descriptor: The fields in the separate message descriptor are set by the queue manager as shown below. If the queue manager does not support the version-2 MQMD, a version-1 MQMD is used without loss of function.

Field in separate MQMD Value used
MDSID MDSIDV
MDVER MDVER2
MDREP Copied from the embedded message descriptor, but with the bits identified by ROAUXM set to zero. (This prevents a COA or COD report message being generated when a message is placed on or removed from a transmission queue.)
MDMT Copied from the embedded message descriptor.
MDEXP Copied from the embedded message descriptor.
MDFB Copied from the embedded message descriptor.
MDENC ENNAT
MDCSI Queue manager's CodedCharSetId attribute.
MDFMT FMXQH
MDPRI Copied from the embedded message descriptor.
MDPER Copied from the embedded message descriptor.
MDMID A new value is generated by the queue manager. This message identifier is different from the MDMID that the queue manager may have generated for the embedded message descriptor (see above).
MDCID The MDMID from the embedded message descriptor.
MDBOC 0
MDRQ Copied from the embedded message descriptor.
MDRM Copied from the embedded message descriptor.
MDUID Copied from the embedded message descriptor.
MDACC Copied from the embedded message descriptor.
MDAID Copied from the embedded message descriptor.
MDPAT ATQM
MDPAN First 28 bytes of the queue manager name.
MDPD Date when message was put on transmission queue.
MDPT Time when message was put on transmission queue.
MDAOD Blanks
MDGID GINONE
MDSEQ 1
MDOFF 0
MDMFL MFNONE
MDOLN OLUNDF

Fields in the embedded message descriptor: The fields in the embedded message descriptor have the same values as those in the MSGDSC parameter of the MQPUT or MQPUT1 call, with the exception of the following:

Putting messages on remote queues: When an application puts a message on a remote queue (either by specifying the name of the remote queue directly, or by using a local definition of the remote queue), the local queue manager:

Putting messages directly on transmission queues: It is also possible for an application to put a message directly on a transmission queue. In this case the application must prefix the application message data with an MQXQH structure, and initialize the fields with appropriate values. In addition, the MDFMT field in the MSGDSC parameter of the MQPUT or MQPUT1 call must have the value FMXQH.

Character data in the MQXQH structure created by the application must be in the character set of the local queue manager (defined by the CodedCharSetId queue manager attribute), and integer data must be in the native machine encoding. In addition, character data in the MQXQH structure must be padded with blanks to the defined length of the field; the data must not be ended prematurely by using a null character, because the queue manager does not convert the null and subsequent characters to blanks in the MQXQH structure.

Note however that the queue manager does not check that an MQXQH structure is present, or that valid values have been specified for the fields.

Getting messages from transmission queues: Applications that get messages from a transmission queue must process the information in the MQXQH structure in an appropriate fashion. The presence of the MQXQH structure at the beginning of the application message data is indicated by the value FMXQH being returned in the MDFMT field in the MSGDSC parameter of the MQGET call. The values returned in the MDCSI and MDENC fields in the MSGDSC parameter indicate the character set and encoding of the character and integer data in the MQXQH structure, respectively. The character set and encoding of the application message data are defined by the MDCSI and MDENC fields in the embedded message descriptor.