Accessing the MQMD header

Code ESQL statements to access the fields of the MQMD header.

WebSphere® MQ, WebSphere MQ Everyplace®, and SCADA messages include an MQMD header. You can refer to the fields within the MQMD, and you can update them in a Compute node.

For example, you might want to copy the message identifier MSGID in the MQMD to another field in your output message. To do that, code:
SET OutputRoot.MRM.Identifier = InputRoot.MQMD.MsgId;
If you send a message to an EBCDIC system from a distributed system, you might need to convert the message to a compatible CodedCharSetId and Encoding. To do this conversion, code the following ESQL in the Compute node:
SET OutputRoot.MQMD.CodedCharSetId = 500; 
SET OutputRoot.MQMD.Encoding = 785;

The MQMD properties of CodedCharSetId and Encoding define the code page and encoding of the section of the message that follows (typically this is either the MQRFH2 header or the message body itself).

Differences exist in the way the Properties folder and the MQMD folder are treated with respect to which folder takes precedence for the same fields. For more information, see Properties versus MQMD folder behavior for various transports.

Related concepts
Message flows overview
ESQL overview
How the message tree is populated
Related tasks
Designing a message flow
Defining message flow content
Managing ESQL files
Related reference
Compute node
ESQL reference
SET statement
The MQMD parser
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:20:22

ac16900_