MQCTLO (Control callback options structure) on IBM i

Structure specifying the control callback function.


Overview

    Purpose
    The MQCTLO structure is used to specify options relating to a control callbacks function.

    The structure is an input and output parameter on the MQCTL call.

    Version
    The current version of MQCTLO is CTLV1.

    Character set and encoding
    Data in MQCTLO must be in the character set given by the CodedCharSetId queue manager attribute and encoding of the local queue manager given by ENNAT. However, if the application is running as an IBM MQ client, the structure must be in the character set and encoding of the client.


Fields

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

    COCONNAREA (10 digit signed integer)

    Control options structure - ConnectionArea field.

    This is a field that is available for the callback function to use.

    The queue manager makes no decisions based on the contents of this field and it is passed unchanged from the CBCCONNAREA field in the MQCBC structure, which is a parameter on the MQCB call.

    This field is ignored for all operations other than CTLSR and CTLSW.

    This is an input and output field to the callback function. The initial value of this field is a null pointer or null bytes.

    COOPT (10 digit signed integer)

    Options that control the action of MQCTLO.

      CTLFQ
      Force the MQCTLO call to fail if the queue manager or connection is in the quiescing state.

      Specify GMFIQ, in the MQGMO options passed on the MQCB call, to cause notification to message consumers when they are quiescing.

      CTLTHR
      This option informs the system that the application requires that all message consumers, for the same connection, are called on the same thread.

    Default option: If we do not need any of the options described, use the following option:

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

    This is an input field. The initial value of the COOPT field is CTLNO.

    CORSV (10 digit signed integer)

    This is a reserved field. The initial value of this field is a blank character.

    COSID (10 digit signed integer)

    Control options structure - StrucId field.

    This is the structure identifier; the value must be:

      CTLSI
      Identifier for Control Options structure.

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

    COVER (10 digit signed integer)

    Control options structure - Version field.

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

      CTLV1
      Version-1 Control options structure.

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

      CTLCV
      Current version of Control options structure.

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


Initial values

Field name Name of constant Value of constant
COSID CTLSI 'CTLO'
COVER CTLV1 1
COOPT CTLNO Nulls
CORSV Reserved field  
COCONNAREA None Null pointer or null bytes


RPG declaration

     D* MQCTLO Structure
     D*
     D*
     D* Structure identifier
     D  COSID                  1      4    INZ('CTLO')
     D*
     D* Structure version number
     D  COVER                  5      8I 0 INZ(1)
     D*
     D* Options that control the action of MQCTL
     D  COOPT                  9     12I 0 INZ(0)
     D*
     D* Reserved
     D  CORSV                 13     16I 0 INZ(-1)
     D*
     D* MQCTL Data area passed to the function
     D  COCONNAREA            17     32*   INZ(*NULL)
Parent topic: Data type descriptions on IBM i