Overview for MQRFH2


Availability

All IBM MQ systems, plus IBM MQ MQI clients connected to these systems.


Purpose

The MQRFH2 header is based on the MQRFH header, but it allows Unicode strings to be transported without translation, and it can carry numeric data types.

The MQRFH2 structure defines the format of the version-2 rules and formatting header. Use this header to send data that has been encoded using an XML-like syntax. A message can contain two or more MQRFH2 structures in series, with user data optionally following the last MQRFH2 structure in the series.


Format name

MQFMT_RF_HEADER_2


Syntax


IBM MQ Message

MQRFH2 headerChainableHeaderUnformatted dataString dataFormatted dataUnchainable headerMQRFH2 header Standard part Special part NameValueLengthNameValueData Standard part RFH¬ 2Version 36StructLength MQENC_NATIVEEncoding -2CodedCharSetId ¬¬¬¬¬¬S¬¬Format Special part 0Flags 120812001348817584


Character set and encoding

Special rules apply to the character set and encoding used for the MQRFH2 structure:

  • Fields other than NameValueData are in the character set and encoding given by the CodedCharSetId and Encoding fields in the header structure that precedes MQRFH2, or by those fields in the MQMD structure if the MQRFH2 is at the start of the application message data.

    The character set must be one that has single-byte characters for the characters that are valid in queue names.

    When MQGMO_CONVERT is specified on the MQGET call, the queue manager converts the MQRFH2 fields, other than NameValueData, to the requested character set and encoding.

  • NameValueData is in the character set given by the NameValueCCSID field. Only the listed Unicode character sets are valid for NameValueCCSID ; see the description of NameValueCCSID for details.

    Some character sets have a representation that depends on the encoding. If NameValueCCSID is one of these character sets, NameValueData must be in the same encoding as the other fields in the MQRFH2.

    When MQGMO_CONVERT is specified on the MQGET call, the queue manager converts NameValueData to the requested encoding, but does not change its character set.

Parent topic: MQRFH2 - Rules and formatting header 2