MQZ_INIT_AUTHORITY (Initialize authorization service) on IBM i

This function is provided by an authorization service component, and is invoked by the queue manager during configuration of the component. It is expected to call MQZEP in order to provide information to the queue manager.

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


Syntax

    MQZ_INIT_AUTHORITY (Hconfig, Options, QMgrName, ComponentDataLength,
    ComponentData, Version, CompCode, Reason)


Parameters

The MQZ_INIT_AUTHORITY call has the following parameters.

    Hconfig (MQHCONFIG) - input
    Configuration handle.

    This handle represents the particular component being initialized. It is to be used by the component when calling the queue manager with the MQZEP function.

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

      MQZIO_PRIMARY
      Primary initialization.

      MQZIO_SECONDARY
      Secondary initialization.

    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.

    ComponentDataLength (MQLONG) - input
    Length of component data.

    Length in bytes of the ComponentData area. This length is defined in the component configuration data.

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

    This is initialized to all zeros before calling the component's primary initialization function. This data is kept by the queue manager on behalf of this particular component; any changes made to it by any of the functions (including the initialization function) provided by this component are preserved, and presented the next time one of this component's functions is called.

    Version (MQLONG) - input/output
    Version number.

    On input to the initialization function, this identifies the highest version number that the queue manager supports. The initialization function must change this, if necessary, to the version of the interface which it supports. If on return the queue manager does not support the version returned by the component, it calls the component's MQZ_TERM_AUTHORITY function and makes no further use of this component.

    The following values are supported:

      MQZAS_VERSION_1
      Version 1.

      MQZAS_VERSION_2
      Version 2.

      MQZAS_VERSION_3
      Version 3.

      MQZAS_VERSION_4
      Version 4.

      MQZAS_VERSION_5
      Version 5.

      MQZAS_VERSION_6
      Version 6.

    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_INITIALIZATION_FAILED
      (2286, X'8EE') Initialization failed for an undefined reason.

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

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


C invocation

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