MQRFH2 - Rules and formatting header 2
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. You 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. Availability
All IBM® MQ systems, plus IBM MQ MQI clients connected to these systems.
Format name
MQFMT_RF_HEADER_2
Syntax
Character set and encoding
MQRFH2
structure:- Fields other than
NameValueData
are in the character set and encoding given by theCodedCharSetId
andEncoding
fields in the header structure that precedesMQRFH2
, or by those fields in theMQMD
structure if theMQRFH2
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 thanNameValueData
, to the requested character set and encoding. NameValueData
is in the character set given by theNameValueCCSID
field. Only the listed Unicode character sets are valid forNameValueCCSID
; see the description ofNameValueCCSID
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 theMQRFH2
.When MQGMO_CONVERT is specified on the
MQGET
call, the queue manager convertsNameValueData
to the requested encoding, but does not change its character set.
Fields
Field name | Name of constant | Value of constant |
---|---|---|
StrucId (structure identifier) | MQRFH_STRUC_ID | 'RFH¬' |
Version (structure version number) | MQRFH_VERSION_2 | 2 |
StrucLength (length in bytes of the MQRFH2 structure) | MQRFH_STRUC_LENGTH_FIXED_2 | 36 |
Encoding (numeric encoding of the data that
follows the last NameValueData field) |
MQENC_NATIVE | Depends on environment |
CodedCharSetId (character set identifier of
the data that follows the last NameValueData field) |
MQCCSI_INHERIT | -2 |
Format (format name of the data that follows
the last NameValueData field) |
MQFMT_NONE | Blanks |
Flags (flags) | MQRFH_NONE | 0 |
NameValueCCSID (coded character set identifier
of the data in the NameValueData field) |
None | 1208 |
NameValueLength (length in bytes of the data
in the NameValueData field) |
None | None |
NameValueData (name-value pairs of message properties) | None | None |
Notes:
|
Language declarations
C declaration for MQRFH2
typedef struct tagMQRFH2 MQRFH2;
struct tagMQRFH2 {
MQCHAR4 StrucId; /* Structure identifier */
MQLONG Version; /* Structure version number */
MQLONG StrucLength; /* Total length of MQRFH2 including all
NameValueLength and NameValueData
fields */
MQLONG Encoding; /* Numeric encoding of data that follows
last NameValueData field */
MQLONG CodedCharSetId; /* Character set identifier of data that
follows last NameValueData field */
MQCHAR8 Format; /* Format name of data that follows last
NameValueData field */
MQLONG Flags; /* Flags */
MQLONG NameValueCCSID; /* Character set identifier of
NameValueData */
};
COBOL declaration for MQRFH2
** MQRFH2 structure
10 MQRFH2.
** Structure identifier
15 MQRFH2-STRUCID PIC X(4).
** Structure version number
15 MQRFH2-VERSION PIC S9(9) BINARY.
** Total length of MQRFH2 including all NAMEVALUELENGTH and
** NAMEVALUEDATA fields
15 MQRFH2-STRUCLENGTH PIC S9(9) BINARY.
** Numeric encoding of data that follows last NAMEVALUEDATA field
15 MQRFH2-ENCODING PIC S9(9) BINARY.
** Character set identifier of data that follows last NAMEVALUEDATA
** field
15 MQRFH2-CODEDCHARSETID PIC S9(9) BINARY.
** Format name of data that follows last NAMEVALUEDATA field
15 MQRFH2-FORMAT PIC X(8).
** Flags
15 MQRFH2-FLAGS PIC S9(9) BINARY.
** Character set identifier of NAMEVALUEDATA
15 MQRFH2-NAMEVALUECCSID PIC S9(9) BINARY.
PL/I declaration for MQRFH2
dcl
1 MQRFH2 based,
3 StrucId char(4), /* Structure identifier */
3 Version fixed bin(31), /* Structure version number */
3 StrucLength fixed bin(31), /* Total length of MQRFH2 including
all NameValueLength and
NameValueData fields */
3 Encoding fixed bin(31), /* Numeric encoding of data that
follows last NameValueData field */
3 CodedCharSetId fixed bin(31), /* Character set identifier of data
that follows last NameValueData
field */
3 Format char(8), /* Format name of data that follows
last NameValueData field */
3 Flags fixed bin(31), /* Flags */
3 NameValueCCSID fixed bin(31); /* Character set identifier of
NameValueData */
High Level Assembler declaration for MQRFH2
MQRFH DSECT
MQRFH_STRUCID DS CL4 Structure identifier
MQRFH_VERSION DS F Structure version number
MQRFH_STRUCLENGTH DS F Total length of MQRFH2 including all
* NAMEVALUELENGTH and NAMEVALUEDATA fields
MQRFH_ENCODING DS F Numeric encoding of data that follows
* last NAMEVALUEDATA field
MQRFH_CODEDCHARSETID DS F Character set identifier of data that
* follows last NAMEVALUEDATA field
MQRFH_FORMAT DS CL8 Format name of data that follows last
* NAMEVALUEDATA field
MQRFH_FLAGS DS F Flags
MQRFH_NAMEVALUECCSID DS F Character set identifier of
* NAMEVALUEDATA
*
MQRFH_LENGTH EQU *-MQRFH
ORG MQRFH
MQRFH_AREA DS CL(MQRFH_LENGTH)
Visual Basic declaration for MQRFH2
Type MQRFH2
StrucId As String*4 'Structure identifier'
Version As Long 'Structure version number'
StrucLength As Long 'Total length of MQRFH2 including all'
'NameValueLength and NameValueData fields'
Encoding As Long 'Numeric encoding of data that follows'
'last NameValueData field'
CodedCharSetId As Long 'Character set identifier of data that'
'follows last NameValueData field'
Format As String*8 'Format name of data that follows last'
'NameValueData field'
Flags As Long 'Flags'
NameValueCCSID As Long 'Character set identifier of NameValueData'
End Type