MQZ_LOOKUP_NAME - Lookup name

This function is provided by a name service component, and is started by the queue manager to retrieve the name of the owning queue manager, for a specified queue.

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


Syntax

MQZ_LOOKUP_NAME( QMgrName , QName , ResolvedQMgrName , ComponentData , Continuation , CompCode , Reason )


Parameters

    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.

    QName
    Type: MQCHAR48 - input

    Queue name. The name of the queue for which an entry is to be resolved. This name is padded with blanks to the full length of the parameter; the name is not terminated by a null character.

    ResolvedQMgrName
    Type: MQCHAR48 - output

    Resolved queue manager name. If the function completes successfully, this is the name of the queue manager that owns the queue.

    The name returned by the service component must be padded on the right with blanks to the full length of the parameter; the name must not be terminated by a null character, or contain leading or embedded blanks.

    ComponentData
    Type: MQBYTExComponentDataLength - 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 (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_NAME call.

    Continuation
    Type: MQLONG - output Continuation indicator set by component. For MQZ_LOOKUP_NAME, the queue manager specifies whether to start another name service component, as follows:

    • If CompCode is MQCC_OK, no further components are started, whatever value is returned in Continuation.
    • If CompCode is not MQCC_OK, a further component is started, unless Continuation is MQZCI_STOP.

    The following values are supported:

      MQZCI_DEFAULT
      Continuation dependent on queue manager.

      MQZCI_CONTINUE
      Continue with next component.

      MQZCI_STOP
      Do not continue with next component.

    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_SERVICE_ERROR
      (2289, X'8F1') Unexpected error occurred accessing service.

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

      MQRC_UNKNOWN_Q_NAME
      (2288, X'8F0') Queue name not found.

    For more information about these reason codes, see API reason codes.


C invocation

MQZ_LOOKUP_NAME (QMgrName, QName, ResolvedQMgrName, ComponentData,
                &Continuation, &CompCode, &Reason);
The parameters passed to the service are declared as follows:
MQCHAR48  QMgrName;          /* Queue manager name */
MQCHAR48  QName;             /* Queue name */
MQCHAR48  ResolvedQMgrName;  /* Resolved queue manager name */
MQBYTE    ComponentData[n];  /* Component data */
MQLONG    Continuation;      /* Continuation indicator set by
                                component */
MQLONG    CompCode;          /* Completion code */
MQLONG    Reason;            /* Reason code qualifying CompCode */
Parent topic: Installable services interface reference information