MQWIH (Work information header) on IBM i

The MQWIH structure describes the information that must be present at the start of a message that is to be handled by the z/OS workload manager.


Overview

Format name: FMWIH.

Character set and encoding: The fields in the MQWIH structure are in the character set and encoding given by the MDCSI and MDENC fields in the header structure that precedes MQWIH, or by those fields in the MQMD structure if the MQWIH 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.

Usage: If a message is to be processed by the z/OS workload manager, the message must begin with an MQWIH structure.


Fields

The MQWIH structure contains the following fields; the fields are described in alphabetical order:

    WICSI (10-digit signed integer)

    Character-set identifier of data that follows MQWIH.

    This specifies the character set identifier of the data that follows the MQWIH structure; it does not apply to character data in the MQWIH structure itself.

    On the MQPUT or MQPUT1 call, the application must set this field to the value appropriate to the data. The following special value can be used:

      CSINHT
      Inherit character-set identifier of this structure.

      Character data in the data following this structure is in the same character set as this structure.

      The queue manager changes this value in the structure sent in the message to the actual character-set identifier of the structure. Provided no error occurs, the value CSINHT is not returned by the MQGET call.

      CSINHT cannot be used if the value of the MDPAT field in MQMD is ATBRKR.

    The initial value of this field is CSUNDF.

    WIENC (10-digit signed integer)

    Numeric encoding of data that follows MQWIH.

    This specifies the numeric encoding of the data that follows the MQWIH structure; it does not apply to numeric data in the MQWIH structure itself.

    On the MQPUT or MQPUT1 call, the application must set this field to the value appropriate to the data.

    The initial value of this field is 0.

    WIFLG (10-digit signed integer)

    Flags

    The value must be:

      WINONE
      No flags.

    The initial value of this field is WINONE.

    WIFMT (8-byte character string)

    Format name of data that follows MQWIH.

    This specifies the format name of the data that follows the MQWIH structure.

    On the MQPUT or MQPUT1 call, the application must set this field to the value appropriate to the data. The rules for coding this field are the same as those for the MDFMT field in MQMD.

    The length of this field is given by LNFMT. The initial value of this field is FMNONE.

    WILEN (10-digit signed integer)

    Length of MQWIH structure.

    The value must be:

      WILEN1
      Length of version-1 work information header structure.

    The following constant specifies the length of the current version:

      WILENC
      Length of current version of work information header structure.

    The initial value of this field is WILEN1.

    WIRSV (32-byte character string)

    Reserved.

    This is a reserved field; it must be blank.

    WISID (4-byte character string)

    Structure identifier.

    The value must be:

      WISIDV
      Identifier for work information header structure.

    The initial value of this field is WISIDV.

    WISNM (32-byte character string)

    Service name.

    This is the name of the service that is to process the message.

    The length of this field is given by LNSVNM. The initial value of this field is 32 blank characters.

    WISST (8-byte character string)

    Service step name.

    This is the name of the step of WISNM to which the message relates.

    The length of this field is given by LNSVST. The initial value of this field is 8 blank characters.

    WITOK (16-byte bit string)

    Message token.

    This is a message token that uniquely identifies the message.

    For the MQPUT and MQPUT1 calls, this field is ignored. The length of this field is given by LNMTOK. The initial value of this field is MTKNON.

    WIVER (10-digit signed integer)

    Structure version number.

    The value must be:

      WIVER1
      Version-1 work information header structure.

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

      WIVERC
      Current version of work information header structure.

    The initial value of this field is WIVER1.


Initial values

Field name Name of constant Value of constant
WISID WISIDV 'WIH¬'
WIVER WIVER1 1
WILEN WILEN1 120
WIENC None 0
WICSI CSUNDF 0
WIFMT FMNONE Blanks
WIFLG WINONE 0
WISNM None Blanks
WISST None Blanks
WITOK MTKNON Nulls
WIRSV None Blanks
Notes:
  1. The symbol ¬ represents a single blank character.


RPG declaration

     D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
     D*
     D* MQWIH Structure
     D*
     D* Structure identifier
     D  WISID                  1      4    INZ('WIH ')
     D* Structure version number
     D  WIVER                  5      8I 0 INZ(1)
     D* Length of MQWIH structure
     D  WILEN                  9     12I 0 INZ(120)
     D* Numeric encoding of data that followsMQWIH
     D  WIENC                 13     16I 0 INZ(0)
     D* Character-set identifier of data thatfollows MQWIH
     D  WICSI                 17     20I 0 INZ(0)
     D* Format name of data that followsMQWIH
     D  WIFMT                 21     28    INZ('        ')
     D* Flags
     D  WIFLG                 29     32I 0 INZ(0)
     D* Service name
     D  WISNM                 33     64    INZ
     D* Service step name
     D  WISST                 65     72    INZ
     D* Message token
     D  WITOK                 73     88    INZ(X'00000000000000-
     D                                     000000000000000000')
     D* Reserved
     D  WIRSV                 89    120    INZ
Parent topic: Data type descriptions on IBM i