Overview for MQRFH2

Availability

All WebSphere® MQ systems, plus WebSphere 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

WebSphere MQ Message

Read syntax diagramSkip visual syntax diagramMQRFH2 headerChainableHeaderUnformatted dataString dataFormatted dataUnchainable header
MQRFH2 header
Read syntax diagramSkip visual syntax diagramStandard part Special part NameValueLengthNameValueData
Standard part
Read syntax diagramSkip visual syntax diagramRFH¬ 2Version 36StructLength MQENC_NATIVEEncoding -2CodedCharSetId ¬¬¬¬¬¬S¬¬Format
Special part
Read syntax diagramSkip visual syntax diagram 0Flags 120812001348817548

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.