Inquire Queue

Use the Inquire Queue command MQCMD_INQUIRE_Q to query the attributes of IBM MQ queues.


Required parameters

    QName (MQCFST)
    Queue name (parameter identifier: MQCA_Q_NAME).

    Generic queue names are supported. A generic name is a character string followed by an asterisk * ; for example ABC*. It selects all queues having names that start with the selected character string. An asterisk on its own matches all possible names.

    The queue name is always returned, regardless of the attributes requested.

    The maximum length of the string is MQ_Q_NAME_LENGTH.


Optional parameters

    CFStructure (MQCFST)
    CF structure (parameter identifier: MQCA_CF_STRUC_NAME). Specifies the name of the CF structure. This parameter is valid only on z/OS .

    This parameter specifies that eligible queues are limited to those having the specified CFStructure value. If this parameter is not specified, then all queues are eligible.

    Generic CF structure names are supported. A generic name is a character string followed by an asterisk * ; for example ABC*. It selects all CF structures having names that start with the selected character string. An asterisk on its own matches all possible names.

    The maximum length of the string is MQ_CF_STRUC_NAME_LENGTH.

    ClusterInfo (MQCFIN)
    Cluster information (parameter identifier: MQIACF_CLUSTER_INFO).

    This parameter requests that cluster information about these queues and other queues in the repository that match the selection criteria is displayed. The cluster information is displayed in addition to information about attributes of queues defined on this queue manager.

    In this case, there might be multiple queues with the same name displayed. The cluster information is shown with a queue type of MQQT_CLUSTER.

    We can set this parameter to any integer value, the value used does not affect the response to the command.

    The cluster information is obtained locally from the queue manager.

    ClusterName (MQCFST)
    Cluster name (parameter identifier: MQCA_CLUSTER_NAME).

    This parameter specifies that eligible queues are limited to those having the specified ClusterName value. If this parameter is not specified, then all queues are eligible.

    Generic cluster names are supported. A generic name is a character string followed by an asterisk * ; for example ABC*. It selects all clusters having names that start with the selected character string. An asterisk on its own matches all possible names.

    The maximum length of the string is MQ_CLUSTER_NAME_LENGTH.

    ClusterNamelist (MQCFST)
    Cluster namelist (parameter identifier: MQCA_CLUSTER_NAMELIST).

    This parameter specifies that eligible queues are limited to those having the specified ClusterNameList value. If this parameter is not specified, then all queues are eligible.

    Generic cluster namelists are supported. A generic name is a character string followed by an asterisk * ; for example ABC*. It selects all cluster namelists having names that start with the selected character string. An asterisk on its own matches all possible names.

    CommandScope (MQCFST)
    Command scope (parameter identifier: MQCACF_COMMAND_SCOPE). This parameter applies to z/OS only. Specifies how the command is processed when the queue manager is a member of a queue sharing group. We can specify one of the following values:

    • Blank (or omit the parameter altogether). The command is processed on the queue manager on which it was entered.
    • A queue manager name. The command is processed on the queue manager you specify, providing it is active within the queue sharing group. If you specify a queue manager name other than the queue manager on which it was entered, we must be using a queue sharing group environment. The command server must be enabled.
    • An asterisk * . The command is processed on the local queue manager and is also passed to every active queue manager in the queue sharing group.

    The maximum length is MQ_QSG_NAME_LENGTH.

    We cannot use CommandScope as a parameter to filter on.

    IntegerFilterCommand (MQCFIF)
    Integer filter command descriptor. The parameter identifier must be any integer type parameter allowed in QAttrs except MQIACF_ALL. Use this parameter to restrict the output from the command by specifying a filter condition. See MQCFIF - PCF integer filter parameter for information about using this filter condition.

    If you specify an integer filter for Qtype or PageSetID, we cannot also specify the Qtype or PageSetID parameter.

    If you specify an integer filter, we cannot also specify a string filter using the StringFilterCommand parameter.

    PageSetID (MQCFIN)
    Page set identifier (parameter identifier: MQIA_PAGESET_ID). This parameter applies to z/OS only.

    This parameter specifies that eligible queues are limited to those having the specified PageSetID value. If this parameter is not specified, then all queues are eligible.

    QAttrs (MQCFIL)
    Queue attributes (parameter identifier: MQIACF_Q_ATTRS). The attribute list might specify the following value on its own. If the parameter is not specified, this value is the default:

      MQIACF_ALL
      All attributes.

    We can also specify a combination of the parameters in the following table:

    Local queue Model queue Alias queue Remote queue Cluster queue
    MQCA_ALTERATION_DATE

    The date on which the information was last altered

    MQCA_ALTERATION_TIME

    The time at which the information was last altered

    MQCA_BACKOUT_REQ_Q_NAME

    Excessive backout requeue name

         
    MQCA_BASE_NAME

    Name of queue that alias resolves to

           
    MQCA_CF_STRUC_NAME

    Coupling facility structure name. This attribute is valid on z/OS only

         
    MQCA_CLUS_CHL_NAME

    The generic name of the cluster-sender channels that use this queue as a transmission queue.

         
    MQCA_CLUSTER_DATE

    Date when the definition became available to the local queue manager

           
    MQCA_CLUSTER_NAME

    Cluster name

     
    MQCA_CLUSTER_NAMELIST

    Cluster namelist

       
    MQCA_CLUSTER_Q_MGR_NAME

    Queue manager name that hosts the queue

           
    MQCA_CLUSTER_TIME

    Time when the definition became available to the local queue manager

           
    MQCA_CREATION_DATE

    Queue creation date

         
    MQCA_CREATION_TIME

    Queue creation time

         
    MQCA_CUSTOM

    The custom attribute for new features

    MQCA_INITIATION_Q_NAME

    Initiation queue name

         
    MQCA_PROCESS_NAME

    Name of process definition

         
    MQCA_Q_DESC

    Queue description

    MQCA_Q_MGR_IDENTIFIER

    Internally generated queue manager name

           
    MQCA_Q_NAME

    Queue name

    MQCA_REMOTE_Q_MGR_NAME

    Name of remote queue manager

           
    MQCA_REMOTE_Q_NAME

    Name of remote queue as known locally on the remote queue manager

           
    MQCA_STORAGE_CLASS

    Storage class. MQCA_STORAGE_CLASS is valid on z/OS only

         
    MQCA_TPIPE_NAME

    The TPIPE name used for communication with OTMA using the IBM MQ IMS bridge

           
    MQCA_TRIGGER_DATA

    Trigger data

         
    MQCA_XMIT_Q_NAME

    Transmission queue name

           
    MQIA_ACCOUNTING_Q

    Accounting data collection

         
    MQIA_BACKOUT_THRESHOLD

    Backout threshold

         
    MQIA_BASE_TYPE

    Type of object

    MQIA_CLUSTER_Q_TYPE

    Cluster queue type

           
    MQIA_CLWL_Q_PRIORITY

    Cluster workload queue priority

     
    MQIA_CLWL_Q_RANK

    Cluster workload queue rank

     
    MQIA_CLWL_USEQ

    Cluster workload use remote setting

           
    MQIA_CURRENT_Q_DEPTH

    Number of messages on queue

           
    MQIA_DEF_BIND

    Default binding

     
    MQIA_DEF_INPUT_OPEN_OPTION

    Default open-for-input option

         
    MQIA_DEF_PERSISTENCE

    Default message persistence

    MQIA_DEF_PRIORITY

    Default message priority

    MQIA_DEF_PUT_RESPONSE_TYPE

    Default put response type

    MQIA_DEF_READ_AHEAD

    Default put response type

    MQIA_DEFINITION_TYPE

    Queue definition type

         
    MQIA_DIST_LISTS

    Distribution list support. MQIA_DIST_LISTS is not valid on z/OS

         
    MQIA_HARDEN_GET_BACKOUT

    Whether to harden backout count

         
    MQIA_INDEX_TYPE

    Index type. This attribute is valid on z/OS only.

         
    MQIA_INHIBIT_GET

    Whether get operations are allowed

       
    MQIA_INHIBIT_PUT

    Whether put operations are allowed

    MQIA_MAX_MSG_LENGTH

    Maximum message length

         
    MQIA_MAX_Q_DEPTH

    Maximum number of messages allowed on queue

         
    MQIA_MEDIA_IMAGE_RECOVER_Q

    Whether a queue object is recoverable from a media image, if linear logging is being used.

         
    MQIA_MONITORING_Q

    Online monitoring data collection

         
    MQIA_MSG_DELIVERY_SEQUENCE

    Whether message priority is relevant

         
    MQIA_NPM_CLASS

    Level of reliability assigned to non-persistent messages that are put to the queue

         
    MQIA_OPEN_INPUT_COUNT

    Number of MQOPEN calls that have the queue open for input

           
    MQIA_OPEN_OUTPUT_COUNT

    Number of MQOPEN calls that have the queue open for output

           
    MQIA_PAGESET_ID

    Page set identifier

           
    MQIA_PROPERTY_CONTROL

    Property control attribute

       
    MQIA_Q_DEPTH_HIGH_EVENT

    Control attribute for queue depth high events.

    We cannot use MQIA_Q_DEPTH_HIGH_EVENT as a filter attribute.

         
    MQIA_Q_DEPTH_HIGH_LIMIT

    High limit for queue depth

         
    MQIA_Q_DEPTH_LOW_EVENT

    Control attribute for queue depth low events.

    We cannot use MQIA_Q_DEPTH_LOW_EVENT as a filter attribute.

         
    MQIA_Q_DEPTH_LOW_LIMIT

    Low limit for queue depth

         
    MQIA_Q_DEPTH_MAX_EVENT

    Control attribute for queue depth max events

         
    MQIA_Q_SERVICE_INTERVAL

    Limit for queue service interval

         
    MQIA_Q_SERVICE_INTERVAL_ EVENT

    Control attribute for queue service interval events

         
    MQIA_Q_TYPE

    Queue type

    MQIA_RETENTION_INTERVAL

    Queue retention interval

         
    MQIA_SCOPE

    Queue definition scope. MQIA_SCOPE is not valid on z/OS or IBM i

       
    MQIA_SHAREABILITY

    Whether queue can be shared

         
    MQIA_STATISTICS_Q

    Statistics data collection. MQIA_STATISTICS_Q is valid only on Multiplatforms.

         
    MQIA_TRIGGER_CONTROL

    Trigger control

         
    MQIA_TRIGGER_DEPTH

    Trigger depth

         
    MQIA_TRIGGER_MSG_PRIORITY

    Threshold message priority for triggers

         
    MQIA_TRIGGER_MTYPE

    Trigger type

         
    MQIA_USAGE

    Usage

         

    QSGDisposition (MQCFIN)
    Disposition of the object within the group (parameter identifier: MQIA_QSG_DISP ). This parameter applies to z/OS only. Specifies the disposition of the object for which information is to be returned. The meaning of the disposition of an object is where the object is defined and how it behaves. The value can be any of the following values:

      MQQSGD_LIVE
      The object is defined as MQQSGD_Q_MGR or MQQSGD_COPY. In a shared queue manager environment, if the command is run on the queue manager where it was issued, MQQSGD_LIVE also returns information for objects defined with MQQSGD_SHARED. MQQSGD_LIVE is the default value if the parameter is not specified.

      MQQSGD_ALL
      The object is defined as MQQSGD_Q_MGR or MQQSGD_COPY.

      In a shared queue manager environment, if the command is run on the queue manager where it was issued, MQQSGD_ALL also displays information for objects defined with MQQSGD_GROUP or MQQSGD_SHARED.

      If MQQSGD_LIVE is specified or defaulted, or if MQQSGD_ALL is specified in a shared queue manager environment, the command might give duplicated names, with different dispositions.

      MQQSGD_COPY
      The object is defined as MQQSGD_COPY.

      MQQSGD_GROUP
      The object is defined as MQQSGD_GROUP. MQQSGD_GROUP is permitted only in a shared queue environment.

      MQQSGD_Q_MGR
      The object is defined as MQQSGD_Q_MGR.

      MQQSGD_PRIVATE
      The object is defined with either MQQSGD_Q_MGR or MQQSGD_COPY.

      MQQSGD_SHARED
      The object is defined as MQQSGD_SHARED. MQQSGD_SHARED is permitted only in a shared queue environment.

    We cannot use QSGDisposition as a parameter to filter on.

    QType (MQCFIN)
    Queue type (parameter identifier: MQIA_Q_TYPE).

    If this parameter is present, eligible queues are limited to the specified type. Any attribute selector specified in the QAttrs list which is valid only for queues of a different type or types is ignored; no error is raised.

    If this parameter is not present, or if MQQT_ALL is specified, queues of all types are eligible. Each attribute specified must be a valid queue attribute selector. The attribute can apply to some of the queues returned. It does not have to apply to all the queues. Queue attribute selectors that are valid but not applicable to the queue are ignored, no error messages occur and no attribute is returned. The following lists contains the value of all valid queue attribute selectors:

      MQQT_ALL
      All queue types.

      MQQT_LOCAL
      Local queue.

      MQQT_ALIAS
      Alias queue definition.

      MQQT_REMOTE
      Local definition of a remote queue.

      MQQT_CLUSTER
      Cluster queue.

      MQQT_MODEL
      Model queue definition.

    Note: On Multiplatforms, if this parameter is present, it must occur immediately after the QName parameter.

    StorageClass (MQCFST)
    Storage class (parameter identifier: MQCA_STORAGE_CLASS). Specifies the name of the storage class. This parameter is valid only on z/OS.

    This parameter specifies that eligible queues are limited to those having the specified StorageClass value. If this parameter is not specified, then all queues are eligible.

    Generic names are supported. A generic name is a character string followed by an asterisk * ; for example ABC*. It selects all storage classes having names that start with the selected character string. An asterisk on its own matches all possible names.

    The maximum length of the string is MQ_STORAGE_CLASS_LENGTH.

    StringFilterCommand (MQCFSF)
    String filter command descriptor. The parameter identifier must be any string type parameter allowed in QAttrs except MQCA_Q_NAME. Use this parameter to restrict the output from the command by specifying a filter condition. See MQCFSF - PCF string filter parameter for information about using this filter condition.

    If you specify a string filter for ClusterName, ClusterNameList, StorageClass, or CFStructure, we cannot also specify that as a parameter.

    If you specify a string filter, we cannot also specify an integer filter using the IntegerFilterCommand parameter.


Error codes

This command might return the following error code in the response format header, in addition to the values shown in Error codes applicable to all commands.

    Reason (MQLONG)
    The value can be any of the following values:

      MQRCCF_Q_TYPE_ERROR
      Queue type not valid.

Parent topic: Definitions of the Programmable Command Formats