MQEPH (Embedded PCF header) on IBM i
Overview
- Purpose
- The MQEPH structure describes the additional data that is present in a message when that message is a programmable command format (PCF) message. The EPPFH field defines the PCF parameters that follow this structure and this allows you to follow the PCF message data with other headers.
- Format name
- EPFMT
- Character set and encoding
- Data in MQEPH must be in the character set and encoding of the local queue manager; this is given by the CCSID queue manager attribute.
Set the character set and encoding of the MQEPH into the MDCSI and MDENC fields in:
- The MQMD (if the MQEPH structure is at the start of the message data), or
- The header structure that precedes the MQEPH structure (all other cases).
- Usage
- We cannot use MQEPH structures to send commands to the command server or any other queue manager PCF-accepting server.
Similarly, the command server or any other queue manager PCF-accepting server do not generate responses or events containing MQEPH structures.
Fields
The MQEPH structure contains the following fields; the fields are described in alphabetical order:
- EPCSI (10-digit signed integer)
-
This is the character set identifier of the data that follows the MQEPH structure and the associated PCF parameters; it does not apply to character data in the MQEPH structure itself.
The initial value of this field is EPCUND.
- EPENC (10-digit signed integer)
-
This is the numeric encoding of the data that follows the MQEPH structure and the associated PCF parameters; it does not apply to character data in the MQEPH structure itself.
The initial value of this field is 0.
- EPFLG (10-digit signed integer)
-
The following values are available:
- EPNONE
- No flags have been specified. MDCSI EPNONE is defined to aid program documentation. It is not intended that this constant be used with any other, but as its value is zero, such use cannot be detected.
- EPCSEM
- The character set of the parameters containing character data is specified individually within the CCSID field in each structure. The character set of the EPSID and EPFMT fields are defined by the CCSID in the header structure that precedes the MQEPH structure, or by the MDCSI field in the MQMD if the MQEPH is at the start of the message.
The initial value of this field is EPNONE.
- EPFMT (8-byte character string)
-
This is the format name of the data that follows the MQEPH structure and the associated PCF parameters.
The initial value of this field is EPFMNO.
- EPLEN (10-digit signed integer)
-
This is the amount of data preceding the next header structure. It includes:
- The length of the MQEPH header
- The length of all PCF parameters following the header
- Any blank padding following those parameters
EPLEN must be a multiple of 4.
The fixed-length part of the structure is defined by EPSTLF.
The initial value of this field is 68.
- EPPCFH (MQCFH)
-
This is the programmable command format (PCF) header, defining the PCF parameters that follow the MQEPH structure. This enables you to follow the PCF message data with other headers.
The PCF header is initially defined with the following values:
The application must change EP3TYP from CFTNON to a valid structure type for the use it is making of the embedded PCF header.Table 1. Initial values of fields in EPPCFH Field name Name of constant Value of constant EP3TYP CFTNON 0 EP3LEN FHLENV 36 EP3VER FHVER3 3 EP3CMD CMNONE 0 EP3SEQ None 1 EP3CTL CFCLST 1 EEP3CC CCOK 0 EP3REA RCNONE 0 EP3CNT None 0 - EPSID (4-byte character string)
-
The value must be:
- EPSTID
- Identifier for the Embedded PCF header structure.
The initial value of this field is EPSTID.
- EPVER (10-digit signed integer)
-
The value can be:
- EPVER1
- Version number for embedded PCF header structure.
The following constant specifies the version number of the current version:
- EPVER3
- Current version of embedded PCF header structure.
The initial value of this field is EPVER3.
Initial values
Field name | Name of constant | Value of constant |
---|---|---|
EPSID | EPSTID | 'EP¬¬' |
EPVER | EPVER1 | 1 |
EPLEN | EPSTLF | 68 |
EPENC | None | 0 |
EPCSI | EPCUND | 0 |
EPFMT | EPFMNO | Blanks |
EPFLG | EPNONE | 0 |
EPPCFH | Names and values as defined in Table 1 | 0 |
- The symbol ¬ represents a single blank character.
RPG declaration
D*..1....:....2....:....3....:....4....:....5....:....6....:....7.. D* MQEPH Structure D* D* Structure identifier D EPSID 1 4 D* Structure version number D EPVER 5 8I 0 D* Total lenght of MQEPH including MQCFHand parameter structures D* that follow D EPLEN 9 12I 0 D* Numeric encoding of data that follows last PCF parameter structure D EPENC 13 16I 0 D* Character set identifier of data that follows last PCF parameter D* structure D EPCSI 17 20I 0 D* Format name of data that follows last PCF parameter structure D EPFMT 21 28 D* Flags D EPFLG 29 32I 0 D* Programmable Command Format Header D EP3TYP 33 36I 0 D EP3LEN 37 40I 0 D EP3VER 41 44I 0 D EP3CMD 45 48I 0 D EP3SEQ 49 52I 0 D EP3CTL 53 56I 0 D EP3CC 57 60I 0 D EP3REA 61 64I 0 D EP3CNT 65 68I 0