MQRFH - Rules and formatting header

The MQRFH structure defines the layout of the rules and formatting header. Use this header to send string data in the form of name-value pairs.

Availability

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

Format name

MQFMT_RF_HEADER

Character set and encoding

The fields in the MQRFH structure (including NameValueString) are in the character set and encoding given by the CodedCharSetId and Encoding fields in the header structure that precedes the MQRFH, or by those fields in the MQMD structure if the MQRFH 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.

Fields

Note: In the following table, the fields are grouped by usage rather than alphabetically. The child topics follow the same sequence.
Table 1. Fields in MQRFH for MQRFH
Field name and description Name of constant Initial value (if any) of constant
StrucId (structure identifier) MQRFH_STRUC_ID 'RFH¬'
Version (structure version number) MQRFH_VERSION_1 1
StrucLength (length in bytes of the MQRFH structure) MQRFH_STRUC_LENGTH_FIXED 32
Encoding (numeric encoding of the data that follows NameValueString) MQENC_NATIVE Depends on environment
CodedCharSetId (specifies the character set identifier of the data that follows NameValueString) MQCCSI_UNDEFINED 0
Format (format name of the data that follows NameValueString) MQFMT_NONE Blanks
Flags (flags) MQRFH_NONE 0
NameValueString (variable-length character string containing name-value pairs) none none
Notes:
  1. The symbol ¬ represents a single blank character.
  2. In the C programming language, the macro variable MQRFH_DEFAULT contains the values that are listed in the table. It can be used in the following way to provide initial values for the fields in the structure:
    
    MQRFH MyRFH = {MQRFH_DEFAULT};
    

Language declarations

C declaration for MQRFH


typedef struct tagMQRFH MQRFH;
struct tagMQRFH {
  MQCHAR4  StrucId;         /* Structure identifier */
  MQLONG   Version;         /* Structure version number */
  MQLONG   StrucLength;     /* Total length of MQRFH including
                               NameValueString */
  MQLONG   Encoding;        /* Numeric encoding of data that follows
                               NameValueString */
  MQLONG   CodedCharSetId;  /* Character set identifier of data that
                               follows NameValueString */
  MQCHAR8  Format;          /* Format name of data that follows
                               NameValueString */
  MQLONG   Flags;           /* Flags */
};

COBOL declaration for MQRFH


**   MQRFH structure
  10 MQRFH.
**    Structure identifier
   15 MQRFH-STRUCID        PIC X(4).
**    Structure version number
   15 MQRFH-VERSION        PIC S9(9) BINARY.
**    Total length of MQRFH including NAMEVALUESTRING
   15 MQRFH-STRUCLENGTH    PIC S9(9) BINARY.
**    Numeric encoding of data that follows NAMEVALUESTRING
   15 MQRFH-ENCODING       PIC S9(9) BINARY.
**    Character set identifier of data that follows NAMEVALUESTRING
   15 MQRFH-CODEDCHARSETID PIC S9(9) BINARY.
**    Format name of data that follows NAMEVALUESTRING
   15 MQRFH-FORMAT         PIC X(8).
**    Flags
   15 MQRFH-FLAGS          PIC S9(9) BINARY.

PL/I declaration for MQRFH


dcl
 1 MQRFH based,
  3 StrucId        char(4),       /* Structure identifier */
  3 Version        fixed bin(31), /* Structure version number */
  3 StrucLength    fixed bin(31), /* Total length of MQRFH including
                                     NameValueString */
  3 Encoding       fixed bin(31), /* Numeric encoding of data that
                                     follows NameValueString */
  3 CodedCharSetId fixed bin(31), /* Character set identifier of data
                                     that follows NameValueString */
  3 Format         char(8),       /* Format name of data that follows
                                     NameValueString */
  3 Flags          fixed bin(31); /* Flags */

High Level Assembler declaration for MQRFH


MQRFH                 DSECT
MQRFH_STRUCID         DS   CL4  Structure identifier
MQRFH_VERSION         DS   F    Structure version number
MQRFH_STRUCLENGTH     DS   F    Total length of MQRFH including
*                               NAMEVALUESTRING
MQRFH_ENCODING        DS   F    Numeric encoding of data that follows
*                               NAMEVALUESTRING
MQRFH_CODEDCHARSETID  DS   F    Character set identifier of data that
*                               follows NAMEVALUESTRING
MQRFH_FORMAT          DS   CL8  Format name of data that follows
*                               NAMEVALUESTRING
MQRFH_FLAGS           DS   F    Flags
*
MQRFH_LENGTH          EQU  *-MQRFH
                      ORG  MQRFH
MQRFH_AREA            DS   CL(MQRFH_LENGTH)

Visual Basic declaration for MQRFH


Type MQRFH
  StrucId        As String*4 'Structure identifier'
  Version        As Long     'Structure version number'
  StrucLength    As Long     'Total length of MQRFH including'
                             'NameValueString'
  Encoding       As Long     'Numeric encoding of data that follows'
                             'NameValueString'
  CodedCharSetId As Long     'Character set identifier of data that'
                             'follows NameValueString'
  Format         As String*8 'Format name of data that follows'
                             'NameValueString'
  Flags          As Long     'Flags'
End Type