MQCFH - PCF header

The MQCFH structure describes the information that is present at the start of the message data of a command message, or a response to a command message. In either case, the message descriptor Format field is MQFMT_ADMIN.

The PCF structures are also used for event messages. In this case the message descriptor Format field is MQFMT_EVENT.

The PCF structures can also be used for user-defined message data. In this case the message descriptor Format field is MQFMT_PCF (see Message descriptor for a PCF command ). Also in this case, not all the fields in the structure are meaningful. The supplied initial values can be used for most fields, but the application must set the StrucLength and ParameterCount fields to the values appropriate to the data.


Fields for MQCFH

    Type (MQLONG)
    Structure type. This field indicates the content of the message. The following values are valid for commands:

      MQCFT_COMMAND
      Message is a command.

      MQCFT_COMMAND_XR
      Message is a command to which standard or extended responses might be sent.

      This value is required on z/OS .

      MQCFT_RESPONSE
      Message is a response to a command.

      MQCFT_XR_MSG
      Message is an extended response to a command. It contains informational or error details.

      MQCFT_XR_ITEM
      Message is an extended response to an Inquire command. It contains item data.

      MQCFT_XR_SUMMARY
      Message is an extended response to a command. It contains summary information.

      MQCFT_USER
      User-defined PCF message.

    StrucLength (MQLONG)
    Structure length. This field is the length in bytes of the MQCFH structure. The value must be:

      MQCFH_STRUC_LENGTH
      Length of command format header structure.

    Version (MQLONG)
    Structure version number. For z/OS, the value must be:

      MQCFH_VERSION_3
      Version number for command format header structure.

    The following constant specifies the version number of the current version:

      MQCFH_CURRENT_VERSION
      Current version of command format header structure.

    Command (MQLONG)
    Command identifier.

    For a command message, this field identifies the function to be performed. For a response message, it identifies the command to which this field is the reply. See the description of each command for the value of this field.

    MsgSeqNumber (MQLONG)
    Message sequence number.

    This field is the sequence number of the message within a set of related messages. For a command, this field must have the value one (because a command is always contained within a single message). For a response, the field has the value one for the first (or only) response to a command, and increases by one for each successive response to that command.

    The last (or only) message in a set has the MQCFC_LAST flag set in the Control field.

    Control (MQLONG)
    Control options. The following values are valid:

      MQCFC_LAST
      Last message in the set.

      For a command, this value must always be set.

      MQCFC_NOT_LAST
      Not the last message in the set.

    CompCode (MQLONG)
    Completion code. This field is meaningful only for a response; its value is not significant for a command. The following values are possible:

      MQCC_OK
      Command completed successfully.

      MQCC_WARNING
      Command completed with warning.

      MQCC_FAILED
      Command failed.

      MQCC_UNKNOWN
      Whether command succeeded is not known.

    Reason (MQLONG)
    Reason code qualifying completion code.

    This field is meaningful only for a response; its value is not significant for a command.

    The possible reason codes that can be returned in response to a command are listed in, Definitions of the Programmable Command Formats and in the description of each command.

    ParameterCount (MQLONG)
    Count of parameter structures.

    This field is the number of parameter structures (MQCFBF, MQCFBS, MQCFIF, MQCFIL, MQCFIN, MQCFSL, MQCFSF, and MQCFST) that follow the MQCFH structure. The value of this field is zero or greater.


C language declaration

typedef struct tagMQCFH {
  MQLONG  Type;            /* Structure type */
  MQLONG  StrucLength;     /* Structure length */
  MQLONG  Version;         /* Structure version number */
  MQLONG  Command;         /* Command identifier */
  MQLONG  MsgSeqNumber;    /* Message sequence number */
  MQLONG  Control;         /* Control options */
  MQLONG  CompCode;        /* Completion code */
  MQLONG  Reason;          /* Reason code qualifying completion code */
  MQLONG  ParameterCount;  /* Count of parameter structures */
 } MQCFH;


COBOL language declaration

**   MQCFH structure
  10 MQCFH.
**    Structure type
   15 MQCFH-TYPE           PIC S9(9) BINARY.
**    Structure length
   15 MQCFH-STRUCLENGTH    PIC S9(9) BINARY.
**    Structure version number
   15 MQCFH-VERSION        PIC S9(9) BINARY.
**    Command identifier
   15 MQCFH-COMMAND        PIC S9(9) BINARY.
**    Message sequence number
   15 MQCFH-MSGSEQNUMBER   PIC S9(9) BINARY.
**    Control options
   15 MQCFH-CONTROL        PIC S9(9) BINARY.
**    Completion code
   15 MQCFH-COMPCODE       PIC S9(9) BINARY.
**    Reason code qualifying completion code
   15 MQCFH-REASON         PIC S9(9) BINARY.
**    Count of parameter structures
   15 MQCFH-PARAMETERCOUNT PIC S9(9) BINARY.


PL/I language declaration ( z/OS only)

dcl
 1 MQCFH based,
  3 Type           fixed bin(31), /* Structure type */
  3 StrucLength    fixed bin(31), /* Structure length */
  3 Version        fixed bin(31), /* Structure version number */
  3 Command        fixed bin(31), /* Command identifier */
  3 MsgSeqNumber   fixed bin(31), /* Message sequence number */
  3 Control        fixed bin(31), /* Control options */
  3 CompCode       fixed bin(31), /* Completion code */
  3 Reason         fixed bin(31), /* Reason code qualifying completion
                                     code */
  3 ParameterCount fixed bin(31); /* Count of parameter structures */


System/390 assembler-language declaration ( z/OS only)

MQCFH                          DSECT
MQCFH_TYPE                     DS   F        Structure type
MQCFH_STRUCLENGTH              DS   F        Structure length
MQCFH_VERSION                  DS   F        Structure version number
MQCFH_COMMAND                  DS   F        Command identifier
MQCFH_MSGSEQNUMBER             DS   F        Message sequence number
MQCFH_CONTROL                  DS   F        Control options
MQCFH_COMPCODE                 DS   F        Completion code
MQCFH_REASON                   DS   F        Reason code qualifying
*                                            completion code
MQCFH_PARAMETERCOUNT           DS   F        Count of parameter
*                                            structures
MQCFH_LENGTH                   EQU  *-MQCFH  Length of structure
                               ORG  MQCFH
MQCFH_AREA                     DS   CL(MQCFH_LENGTH)


Visual Basic language declaration ( Windows only)

Type MQCFH
  Type As Long            'Structure type
  StrucLength As Long     'Structure length
  Version As Long         'Structure version number
  Command As Long         'Command identifier
  MsgSeqNumber As Long    'Message sequence number
  Control As Long         'Control options
  CompCode As Long        'Completion code
  Reason As Long          'Reason code qualifying completion code
  ParameterCount As Long  'Count of parameter structures
End Type

Global MQCFH_DEFAULT As MQCFH


RPG language declaration ( IBM i only)

D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
D* MQCFH Structure
D*
D* Structure type
D  FHTYP                  1      4I 0 INZ(1)
D* Structure length
D  FHLEN                  5      8I 0 INZ(36)
D* Structure version number
D  FHVER                  9     12I 0 INZ(1)
D* Command identifier
D  FHCMD                 13     16I 0 INZ(0)
D* Message sequence number
D  FHSEQ                 17     20I 0 INZ(1)
D* Control options
D  FHCTL                 21     24I 0 INZ(1)
D* Completion code
D  FHCMP                 25     28I 0 INZ(0)
D* Reason code qualifying completion code
D  FHREA                 29     32I 0 INZ(0)
D* Count of parameter structures
D  FHCNT                 33     36I 0 INZ(0)
D*
Parent topic: Structures for commands and responses