MQZ_INIT_USERID - Initialize user identifier service

This function is provided by a user ID 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.

Syntax


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

Parameters

The  MQZ_INIT_USERID  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 always has the following value:

MQZIO_PRIMARY
Primary 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 user identifier 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×ComponentDataLength) - input/output

Component data.

This is initialized to all zeroes 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_USERID  function and makes no further use of this component.

The following value is suppported:

MQZUS_VERSION_1
Version 1.

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 the WebSphere MQ Application Programming Reference.

C invocation

MQZ_INIT_USERID (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 */



© IBM Corporation 1994, 2002. All Rights Reserved