MQZ_INIT_AUTHORITY - Initialize authorization service

This function is provided by an authorization service component, and is started 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

Hconfig
Type: 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
Type: MQLONG - input
Initialization options. It must be one of the following values:
MQZIO_PRIMARY
Primary initialization.
MQZIO_SECONDARY
Secondary initialization.
QMgrName
Type: 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 use it in any defined manner.

ComponentDataLength
Type: MQLONG - input

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

ComponentData
Type: MQBYTE x ComponentDataLength - input/output

Component data. This is initialized to all zeros before calling the component 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 these component functions is called.

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

Version
Type: 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 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
Type: MQLONG - output
Completion code. It must be one of the following values:
MQCC_OK
Successful completion.
MQCC_FAILED
Call failed.
Reason
Type: 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 about these reason codes, see API completion and 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 */