MQCMD_INQUIRE_Q (Inquire Queue)

Use the Inquire Queue (MQCMD_INQUIRE_Q) PCF command 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

[MQ 9.3.1 Oct 2022][UNIX, Linux, Windows, IBM i]CapExpiry (MQCFIN)
Capped expiry processing (parameter identifier MQIA_CAP_EXPIRY) which can be an integer value or can take the value of MQCEX_NOLIMIT.

Specifies a lifetime limit for messages put using the object, expressed in 10ths of a second. A value of -1, displayed as NOLIMIT, has no effect on processing.

CapExpiry provides, or limits, the value in the MQMD Expiry field of any message put.

An application provided MQMD Expiry that is less than any resolved CapExpiry value is passed. This value is not replaced by that resolved CapExpiry value.

This process allows an IBM MQ administrator to limit the life of messages put by an application that overlooked (or was unable to provide, in the case of MQTT) message expiration criteria.

However, this option does not allow an administrator to override application behavior where the required lifetime of messages was under-estimated.

The new capped value for expiry is used during the put processing as if it had been provided by the application in the MQMD structure.

The capped value is evaluated for each put being performed,and so is sensitive to the resolution of the put operation. For example, in a cluster, where the put operation is performed with BIND NOT FIXED, messages might pick up different expiry values depending on the CapExpiry value set for the transmission queue used by the channel.

[z/OS]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.

You 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.

[z/OS]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. You 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, you 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.

You 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, you cannot also specify the Qtype or PageSetID parameter.

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

[z/OS]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.

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

Table 1. Inquire Queue command, queue attributes
Local queue Model queue Alias queue Remote queue Cluster queue
MQCA_ALTERATION_DATE

The date on which the information was last altered

X X X X X
MQCA_ALTERATION_TIME

The time at which the information was last altered

X X X X X
MQCA_BACKOUT_REQ_Q_NAME

Excessive backout requeue name

X X      
MQCA_BASE_NAME

Name of queue that alias resolves to

    X    
MQCA_CF_STRUC_NAME

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

X X      
MQCA_CLUS_CHL_NAME

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

X X      
MQCA_CLUSTER_DATE

Date when the definition became available to the local queue manager

        X
MQCA_CLUSTER_NAME

Cluster name

X   X X X
MQCA_CLUSTER_NAMELIST

Cluster namelist

X   X X  
MQCA_CLUSTER_Q_MGR_NAME

Queue manager name that hosts the queue

        X
MQCA_CLUSTER_TIME

Time when the definition became available to the local queue manager

        X
MQCA_CREATION_DATE

Queue creation date

X X      
MQCA_CREATION_TIME

Queue creation time

X X      
MQCA_CUSTOM

The custom attribute for new features

X X X X X
MQCA_INITIATION_Q_NAME

Initiation queue name

X X      
MQCA_PROCESS_NAME

Name of process definition

X X      
MQCA_Q_DESC

Queue description

X X X X X
MQCA_Q_MGR_IDENTIFIER

Internally generated queue manager name

        X
MQCA_Q_NAME

Queue name

X X X X X
MQCA_REMOTE_Q_MGR_NAME

Name of remote queue manager

      X  
MQCA_REMOTE_Q_NAME

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

      X  
[z/OS]MQCA_STORAGE_CLASS

Storage class. MQCA_STORAGE_CLASS is valid on z/OS only

[z/OS] X [z/OS] X [z/OS]  [z/OS]  [z/OS] 
[MQ 9.3.0 Jun 2022][UNIX, Linux, Windows, IBM i]MQCA_STREAM_QUEUE_NAME

Name of streaming queue

X X
MQCA_TPIPE_NAME

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

X        
MQCA_TRIGGER_DATA

Trigger data

X X      
MQCA_XMIT_Q_NAME

Transmission queue name

      X  
MQIA_ACCOUNTING_Q

Accounting data collection

X X      
MQIA_BACKOUT_THRESHOLD

Backout threshold

X X      
MQIA_BASE_TYPE

Type of object

X X X X X
MQIA_CLUSTER_Q_TYPE

Cluster queue type

        X
MQIA_CLWL_Q_PRIORITY

Cluster workload queue priority

X   X X X
MQIA_CLWL_Q_RANK

Cluster workload queue rank

X   X X X
MQIA_CLWL_USEQ

Cluster workload use remote setting

X        
MQIA_CURRENT_Q_DEPTH

Number of messages on queue

X        
MQIA_DEF_BIND

Default binding

X   X X X
MQIA_DEF_INPUT_OPEN_OPTION

Default open-for-input option

X X      
MQIA_DEF_PERSISTENCE

Default message persistence

X X X X X
MQIA_DEF_PRIORITY

Default message priority

X X X X X
MQIA_DEF_PUT_RESPONSE_TYPE

Default put response type

X X X X X
MQIA_DEF_READ_AHEAD

Default put response type

X X X X X
MQIA_DEFINITION_TYPE

Queue definition type

X X      
MQIA_DIST_LISTS

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

X X      
MQIA_HARDEN_GET_BACKOUT

Whether to harden backout count

X X      
MQIA_INDEX_TYPE

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

X X      
MQIA_INHIBIT_GET

Whether get operations are allowed

X X X    
MQIA_INHIBIT_PUT

Whether put operations are allowed

X X X X X
MQIA_MAX_MSG_LENGTH

Maximum message length

X X      
MQIA_MAX_Q_DEPTH

Maximum number of messages allowed on queue

X X      
MQIA_MEDIA_IMAGE_RECOVER_Q

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

X X      
MQIA_MONITORING_Q

Online monitoring data collection

X X      
MQIA_MSG_DELIVERY_SEQUENCE

Whether message priority is relevant

X X      
MQIA_NPM_CLASS

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

X X      
MQIA_OPEN_INPUT_COUNT

Number of MQOPEN calls that have the queue open for input

X        
MQIA_OPEN_OUTPUT_COUNT

Number of MQOPEN calls that have the queue open for output

X        
[z/OS]MQIA_PAGESET_ID

Page set identifier

[z/OS] X [z/OS]  [z/OS]  [z/OS]  [z/OS] 
MQIA_PROPERTY_CONTROL

Property control attribute

X X X    
MQIA_Q_DEPTH_HIGH_EVENT

Control attribute for queue depth high events.

You cannot use MQIA_Q_DEPTH_HIGH_EVENT as a filter attribute.

X X      
MQIA_Q_DEPTH_HIGH_LIMIT

High limit for queue depth

X X      
MQIA_Q_DEPTH_LOW_EVENT

Control attribute for queue depth low events.

You cannot use MQIA_Q_DEPTH_LOW_EVENT as a filter attribute.

X X      
MQIA_Q_DEPTH_LOW_LIMIT

Low limit for queue depth

X X      
MQIA_Q_DEPTH_MAX_EVENT

Control attribute for queue depth max events

X X      
MQIA_Q_SERVICE_INTERVAL

Limit for queue service interval

X X      
MQIA_Q_SERVICE_INTERVAL_ EVENT

Control attribute for queue service interval events

X X      
MQIA_Q_TYPE

Queue type

X X X X X
MQIA_RETENTION_INTERVAL

Queue retention interval

X X      
MQIA_SCOPE

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

X   X X  
MQIA_SHAREABILITY

Whether queue can be shared

X X      
MQIA_STATISTICS_Q

Statistics data collection. MQIA_STATISTICS_Q is valid only on Multiplatforms.

X X      
[MQ 9.3.0 Jun 2022][UNIX, Linux, Windows, IBM i]MQIA_STREAM_QUEUE_QOS

Quality of service on streaming queue

X X
MQIA_TRIGGER_CONTROL

Trigger control

X X      
MQIA_TRIGGER_DEPTH

Trigger depth

X X      
MQIA_TRIGGER_MSG_PRIORITY

Threshold message priority for triggers

X X      
MQIA_TRIGGER_MTYPE

Trigger type

X X      
MQIA_USAGE

Usage

X X      
[z/OS]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.

You 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.
[UNIX, Linux, Windows, IBM i]Note: On Multiplatforms, if this parameter is present, it must occur immediately after the QName parameter.
[z/OS]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, you cannot also specify that as a parameter.

If you specify a string filter, you 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.