MQCMHO (Create message handle options) on IBM i

The MQCMHO structure allows applications to specify options that control how message handles are created.


Overview

    Purpose
    The structure is an input parameter on the MQCRTMH call.

    Character set and encoding
    Data in MQCMHO must be in the character set of the application and encoding of the application (ENNAT).


Fields

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

    CMOPT (10 digit signed integer)
    One of the following options can be specified:

      CMVAL
      When MQSETMP is called to set a property in this message handle, the property name is validated to ensure that it:

      • contains no invalid characters.
      • does not begin "JMS" or "usr.JMS" except for the following:

        • JMSCorrelationID
        • JMSReplyTo
        • JMSType
        • JMSXGroupID
        • JMSXGroupSeq

        These names are reserved for JMS properties.

      • is not one of the following keywords, in any mixture of upper or lowercase:

        • "AND"
        • "BETWEEN"
        • "ESCAPE"
        • "FALSE"
        • "IN"
        • "IS"
        • "LIKE"
        • "NOT"
        • "NULL"
        • "OR"
        • "TRUE"

      • does not begin "Body." or "Root." (except for "Root.MQMD.").

      If the property is MQ-defined ("mq.*") and the name is recognized, the property descriptor fields are set to the correct values for the property. If the property is not recognized, the Support field of the property descriptor is set to PDSUPO (for more information, see PDSUP ).

      CMDEFV

      This specifies that the default level of validation of property names occurs.

      The default level of validation is equivalent to that specified by CMVAL.

      In a future release an administrative option might be defined which will change the level of validation that will occur when CMDEFV is defined.

      This is the default value.

      CMNOVA

      No validation on the property name occurs. See the description of CMVAL.

    Default option: If none of the options previously described in this section is required, the following option can be used:

      CMNONE

      All options assume their default values. Use this value to indicate that no other options have been specified. CMNONE aids program documentation; it is not intended that this option be used with any other, but as its value is zero, such use cannot be detected.

    This is always an input field. The initial value of this field is CMDEFV.

    CMSID (10 digit signed integer)

    This is the structure identifier; the value must be:

      CMSIDV
      Identifier for create message handle options structure.

    This is always an input field. The initial value of this field is CMSIDV.

    CMVER (10 digit signed integer)

    This is the structure version number; the value must be:

    CMVER1
    Version-1 create message handle options structure.

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

    CMVERC
    Current version of create message handle options structure.

    This is always an input field. The initial value of this field is CMVER1.


Initial values

Field name Name of constant Value of constant
CMSID CMSIDV 'CMHO'
CMVER CMVER1 1
CMOPT CMDEFV 0


RPG declaration

     D* MQCMHO Structure
     D*
     D*
     D* Structure identifier
     D  CMSID                  1      4    INZ('CMHO')
     D*
     D* Structure version number
     D  CMVER                  5      8I 0 INZ(1)
     D*
     D* Options that control the action of MQCRTMH
     D  CMOPT                  9     12I 0 INZ(0)
Parent topic: Data type descriptions on IBM i