MQZ_TERM_AUTHORITY - Terminate authorization service

This function is provided by an authorization service component, and is invoked by the queue manager when it no longer requires the services of this component. The function must perform any cleanup required by the component.

The function identifier for this function (for MQZEP) is MQZID_TERM_AUTHORITY.


Syntax

    MQZ_TERM_AUTHORITY (Hconfig, Options, QMgrName, ComponentData,
    CompCode, Reason)


Parameters

The MQZ_TERM_AUTHORITY call has the following parameters.

    Hconfig (MQHCONFIG) - input
    Configuration handle.

    This handle represents the particular component being terminated.

    Options (MQLONG) - input
    Termination options. It is one of the following:

      MQZTO_PRIMARY
      Primary termination.

      MQZTO_SECONDARY
      Secondary termination.

    QMgrName (MQCHAR48) - input
    Queue manager name.

    The name of the queue manager calling the component. This name is padded with blanks to the full length of the parameter; the name is not terminated by a null character.

    The queue manager name is passed to the component for information; the authorization service interface does not require the component to make use of it in any defined manner.

    ComponentData (MQBYTE x ComponentDataLength) - input/output
    Component data.

    This data is kept by the queue manager on behalf of this particular component; any changes made to it by any of the functions provided by this component are preserved, and presented the next time one of this component's functions is called.

    The length of this data area is passed by the queue manager in the ComponentDataLength parameter on the MQZ_INIT_AUTHORITY call.

    When the MQZ_TERM_AUTHORITY call has completed, the queue manager discards this data.

    CompCode (MQLONG) - output
    Completion code. It is one of the following:

      MQCC_OK
      Successful completion.

      MQCC_FAILED
      Call failed.

    Reason (MQLONG) - output
    Reason code qualifying CompCode. If CompCode is MQCC_OK:

      MQRC_NONE
      (0, X'000') No reason to report.

    If CompCode is MQCC_FAILED:

      MQRC_SERVICE_NOT_AVAILABLE
      (2285, X'8ED') Underlying service not available.

      MQRC_TERMINATION_FAILED
      (2287, X'8FF') Termination failed for an undefined reason.

    For more information on these reason codes, see Reason codes.


C invocation

MQZ_TERM_AUTHORITY (Hconfig, Options, QMgrName, ComponentData,
                   &CompCode, &Reason);
The parameters passed to the service are declared as follows:
MQHCONFIG  Hconfig;           /* Configuration handle */
MQLONG     Options;           /* Termination options */
MQCHAR48   QMgrName;          /* Queue manager name */
MQBYTE     ComponentData[n];  /* Component data */
MQLONG     CompCode;          /* Completion code */
MQLONG     Reason;            /* Reason code qualifying CompCode */
Parent topic: Installable services interface reference information on IBM i