MQZ_INQUIRE - Inquire authorization service

This function is provided by a MQZAS_VERSION_5 authorization service component, and is started by the queue manager to query the supported functionality.

Where multiple service components are used, service components are called in reverse order to the order they were installed in.

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


Syntax

MQZ_INQUIRE( QMgrName , SelectorCount , Selectors , IntAttrCount , IntAttrs , CharAttrLength , CharAttrs , SelectorReturned , 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.

    SelectorCount
    Type: MQLONG - input

    Number of selectors. The number of selectors supplied in the Selectors parameter.

    The value must be in the range 0 through 256.

    Selectors
    Type: MQLONGxSelectorCount - input Array of selectors. Each selector identifies a required attribute and must be one of the following:

    • MQIACF_INTERFACE_VERSION (integer)
    • MQIACF_USER_ID_SUPPORT (integer)
    • MQCACF_SERVICE_COMPONENT (character)

    Selectors can be specified in any order. The number of selectors in the array is indicated by the SelectorCount parameter.

    Integer attributes identified by selectors are returned in the IntAttrs parameter in the same order as they appear in Selectors.

    Character attributes identified by selectors are returned in the CharAttrs parameter in the same order as they in appear Selectors.

    IntAttrCount
    Type: MQLONG - input

    Number of integer attributes supplied in the IntAttrs parameter.

    The value must be in the range 0 through 256.

    IntAttrs
    Type: MQLONG x IntAttrCount - output

    Integer attributes. Array of integer attributes. The integer attributes are returned in the same order as the corresponding integer selectors in the Selectors array.

    CharAttrCount
    Type: MQLONG - input

    Length of the character attributes buffer. The length in bytes of the CharAttrs parameter.

    The value must be at least the sum of the lengths of the requested character attributes. If no character attributes are requested, zero is a valid value.

    CharAttrs
    Type: MQLONG x CharAttrCount - output

    Character attributes buffer. Buffer containing character attributes, concatenated together. The character attributes are returned in the same order as the corresponding character selectors in the Selectors array.

    The length of the buffer is given by the CharAttrCount parameter.

    SelectorReturned
    Type: MQLONG x SelectorCount - input Selector returned. Array of values identifying which attributes have been returned from the set requested for by the selectors in the Selectors parameter. The number of values in this array is indicated by the SelectorCount parameter. Each value in the array relates to the selector from the corresponding position in the Selectors array. Each value is one of the following:

      MQZSL_RETURNED
      The attribute requested by the corresponding selector in the Selectors parameter has been returned.

      MQZSL_NOT_RETURNED
      The attribute requested by the corresponding selector in the Selectors parameter has not been returned.

    The array is initialized with all values as MQZSL_NOT_RETURNED. When an authorization service component returns an attribute, it sets the appropriate value in the array to MQZSL_NOT_RETURNED. This allows any other authorization service components, to which the inquire call is made, to identify which attributes have already been returned.

    ComponentData
    Type: 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 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.

    Continuation
    Type: MQLONG - output Continuation indicator set by component. The following values can be specified:

      MQZCI_DEFAULT
      Continuation dependent on queue manager.

      For MQZ_CHECK_AUTHORITY, this has the same effect as MQZCI_STOP.

      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_WARNING
      Partial 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_WARNING:

      MQRC_CHAR_ATTRS_TOO_SHORT
      Not enough space for character attributes.

      MQRC_INT_COUNT_TOO_SMALL
      Not enough space for integer attributes.

    If CompCode is MQCC_FAILED:

      MQRC_SELECTOR_COUNT_ERROR
      Number of selectors is not valid.

      MQRC_SELECTOR_ERROR
      Attribute selector not valid.

      MQRC_SELECTOR_LIMIT_EXCEEDED
      Too many selectors specified.

      MQRC_INT_ATTR_COUNT_ERROR
      Number of integer attributes is not valid.

      MQRC_INT_ATTRS_ARRAY_ERROR
      Integer attributes array not valid.

      MQRC_CHAR_ATTR_LENGTH_ERROR
      Number of character attributes is not valid.

      MQRC_CHAR_ATTRS_ERROR
      Character attributes string is not valid.

      MQRC_SERVICE_ERROR
      (2289, X'8F1') Unexpected error occurred accessing service.

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


C invocation

MQZ_INQUIRE (QMgrName, SelectorCount, Selectors, IntAttrCount,
                   &IntAttrs, CharAttrLength, &CharAttrs, 
                   SelectorReturned, ComponentData, &Continuation,
                   &CompCode, &Reason);
The parameters passed to the service are declared as follows:
MQCHAR48   QMgrName;              /* Queue manager name */
MQLONG     SelectorCount;         /* Selector count */
MQLONG     Selectors[n];          /* Selectors */
MQLONG     IntAttrCount;          /* IntAttrs count */
MQLONG     IntAttrs[n];           /* Integer attributes */
MQLONG     CharAttrCount;         /* CharAttrs count */
MQLONG     CharAttrs[n];          /* Chatacter attributes */
MQLONG     SelectorReturned[n];   /* Selector returned */
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