MQINQ - Inquire object attributes

The MQINQ call returns an array of integers and a set of character strings containing the attributes of an object.

The following types of object are valid:
  • Queue manager
  • Queue
  • Namelist
  • Process definition

Syntax

MQINQ (Hconn, Hobj, SelectorCount, Selectors, IntAttrCount, IntAttrs, CharAttrLength, CharAttrs, CompCode, Reason)

Parameters

Hconn
Type: MQHCONN - input

This handle represents the connection to the queue manager. The value of Hconn was returned by a previous MQCONN or MQCONNX call.

On z/OS® for CICS® applications, and on IBM® i for applications running in compatibility mode, the MQCONN call can be omitted, and the following value specified for Hconn :
MQHC_DEF_HCONN
Default connection handle.
[IBMi]Important: If you are still using compatibility mode, consider recompiling your application and using static bound calls instead. See Compatibility mode for RPG applications on IBM i
Hobj
Type: MQHOBJ - input

This handle represents the object (of any type) with attributes that are required. The handle must be returned by a previous MQOPEN call that specified the MQOO_INQUIRE option.

SelectorCount
Type: MQLONG - input

This is the count of selectors that are supplied in the Selectors array. It is the number of attributes that are to be returned. Zero is a valid value. The maximum number allowed is 256.

Selectors
Type: MQLONG x SelectorCount - input

This is an array of SelectorCount attribute selectors; each selector identifies an attribute (integer or character) with a value that is required.

Each selector must be valid for the type of object that Hobj represents, otherwise the call fails with completion code MQCC_FAILED and reason code MQRC_SELECTOR_ERROR.

In the special case of queues:
  • If the selector is not valid for queues of any type, the call fails with completion code MQCC_FAILED and reason code MQRC_SELECTOR_ERROR.
  • If the selector applies only to queues of types other than the type of the object, the call succeeds with completion code MQCC_WARNING and reason code MQRC_SELECTOR_NOT_FOR_TYPE.
  • If the queue being inquired is a cluster queue, the selectors that are valid depend on how the queue was resolved; see Usage notes for further details.
You can specify selectors in any order. Attribute values that correspond to integer attribute selectors ( MQIA_* selectors) are returned in IntAttrs in the same order in which these selectors occur in Selectors. Attribute values that correspond to character attribute selectors ( MQCA_* selectors) are returned in CharAttrs in the same order in which those selectors occur. MQIA_* selectors can be interleaved with the MQCA_* selectors; only the relative order within each type is important.
Note:
  1. The integer and character attribute selectors are allocated within two different ranges; the MQIA_* selectors reside within the range MQIA_FIRST through MQIA_LAST, and the MQCA_* selectors within the range MQCA_FIRST through MQCA_LAST.

    For each range, the constants MQIA_LAST_USED and MQCA_LAST_USED define the highest value that the queue manager accepts.

  2. If all the MQIA_* selectors occur first, the same element numbers can be used to address corresponding elements in the Selectors and IntAttrs arrays.
  3. If the SelectorCount parameter is zero, Selectors is not referred to. In this case, the parameter address passed by programs written in C or S/390 assembler might be null.

The attributes that can be inquired are listed in the following tables. For the MQCA_* selectors, the constant that defines the length in bytes of the resulting string in CharAttrs is provided in parentheses.

The tables that follow list the selectors, by object, in alphabetical order, as follows:
  • Table 1 MQINQ attribute selectors for queues
  • Table 2 MQINQ attribute selectors for namelists
  • Table 3 MQINQ attribute selectors for process definitions
  • Table 4 MQINQ attribute selectors for the queue manager
All selectors are supported on all IBM MQ platforms, except where indicated in the Note column as follows:
Not z/OS
Supported on all platforms except z/OS
z/OS
Supported only on z/OS
Table 1. MQINQ attribute selectors for queues
Selector Length of field Description Note
MQCA_ALTERATION_DATE MQ_DATE_LENGTH Date of most-recent alteration  
MQCA_ALTERATION_TIME MQ_TIME_LENGTH Time of most-recent alteration  
MQCA_BACKOUT_REQ_Q_NAME MQ_Q_NAME_LENGTH Excessive backout requeue name  
MQCA_BASE_Q_NAME MQ_Q_NAME_LENGTH Name of queue that alias resolves to  
MQCA_CF_STRUC_NAME MQ_CF_STRUC_NAME_LENGTH Coupling-facility structure name z/OS
MQCA_CLUS_CHL_NAME MQ_CHANNEL_NAME_LENGTH Name of the cluster-sender channel that uses this queue as a transmission queue.  
MQCA_CLUSTER_NAME MQ_CLUSTER_NAME_LENGTH Cluster name  
MQCA_CLUSTER_NAMELIST MQ_NAMELIST_NAME_LENGTH Cluster namelist  
MQCA_CREATION_DATE MQ_CREATION_DATE_LENGTH Queue creation date  
MQCA_CREATION_TIME MQ_CREATION_TIME_LENGTH Queue creation time  
MQCA_CUSTOM MQ_CUSTOM_LENGTH The custom attribute for new features  
MQCA_INITIATION_Q_NAME MQ_Q_NAME_LENGTH Initiation queue name  
MQCA_PROCESS_NAME MQ_PROCESS_NAME_LENGTH Name of process definition  
MQCA_Q_DESC MQ_Q_DESC_LENGTH Queue description  
MQCA_Q_NAME MQ_Q_NAME_LENGTH Queue name  
MQCA_REMOTE_Q_MGR_NAME MQ_Q_MGR_NAME_LENGTH Name of remote queue manager  
MQCA_REMOTE_Q_NAME MQ_Q_NAME_LENGTH Name of remote queue as known on remote queue manager  
MQCA_STORAGE_CLASS MQ_STORAGE_CLASS_LENGTH Name of storage class z/OS
MQCA_TRIGGER_DATA MQ_TRIGGER_DATA_LENGTH Trigger data  
MQCA_XMIT_Q_NAME MQ_Q_NAME_LENGTH Transmission queue name  
MQIA_ACCOUNTING_Q MQLONG Controls collection of accounting data for queue Not z/OS
MQIA_BACKOUT_THRESHOLD MQLONG Backout threshold  
MQIA_CLWL_Q_PRIORITY MQLONG Priority of queue  
MQIA_CLWL_Q_RANK MQLONG Rank of queue  
MQIA_CLWL_USEQ MQLONG Use remote queues  
MQIA_CURRENT_Q_DEPTH MQLONG Number of messages on queue  
MQIA_DEF_BIND MQLONG Default binding  
MQIA_DEF_INPUT_OPEN_OPTION MQLONG Default open-for-input option  
MQIA_DEF_PERSISTENCE MQLONG Default message persistence  
MQIA_DEF_PRIORITY MQLONG Default message priority  
MQIA_DEFINITION_TYPE MQLONG Queue definition type  
MQIA_DIST_LISTS MQLONG Distribution list support Not z/OS
MQIA_HARDEN_GET_BACKOUT MQLONG Whether to harden backout count  
MQIA_INDEX_TYPE MQLONG Type of index maintained for queue z/OS
MQIA_INHIBIT_GET MQLONG Whether get operations are allowed  
MQIA_INHIBIT_PUT MQLONG Whether put operations are allowed  
MQIA_MAX_MSG_LENGTH MQLONG Maximum message length  
MQIA_MAX_Q_DEPTH MQLONG Maximum number of messages allowed on queue  
MQIA_MSG_DELIVERY_SEQUENCE MQLONG Whether message priority is relevant  
MQIA_NPM_CLASS MQLONG Level of reliability for nonpersistent messages  
MQIA_OPEN_INPUT_COUNT MQLONG Number of MQOPEN calls that have the queue open for input  
MQIA_OPEN_OUTPUT_COUNT MQLONG Number of MQOPEN calls that have the queue open for output  
MQIA_PROPERTY_CONTROL MQLONG Property control attribute  
MQIA_Q_DEPTH_HIGH_EVENT MQLONG Control attribute for queue depth high events Not z/OS
MQIA_Q_DEPTH_HIGH_LIMIT MQLONG High limit for queue depth Not z/OS
MQIA_Q_DEPTH_LOW_EVENT MQLONG Control attribute for queue depth low events Not z/OS
MQIA_Q_DEPTH_LOW_LIMIT MQLONG Low limit for queue depth Not z/OS
MQIA_Q_DEPTH_MAX_EVENT MQLONG Control attribute for queue depth max events Not z/OS
MQIA_Q_SERVICE_INTERVAL MQLONG Limit for queue service interval Not z/OS
MQIA_Q_SERVICE_INTERVAL_EVENT MQLONG Control attribute for queue service interval events Not z/OS
MQIA_Q_TYPE MQLONG Queue type  
MQIA_QSG_DISP MQLONG Queue-sharing group disposition z/OS
MQIA_RETENTION_INTERVAL MQLONG Queue retention interval  
MQIA_SCOPE MQLONG Queue definition scope Not z/OS
MQIA_SHAREABILITY MQLONG Whether queue can be shared for input  
MQIA_STATISTICS_Q MQLONG Controls collection of statistics data for queue Not z/OS
MQIA_TRIGGER_CONTROL MQLONG Trigger control  
MQIA_TRIGGER_DEPTH MQLONG Trigger depth  
MQIA_TRIGGER_MSG_PRIORITY MQLONG Threshold message priority for triggers  
MQIA_TRIGGER_TYPE MQLONG Trigger type  
MQIA_USAGE MQLONG Usage  
Table 2. MQINQ attribute selectors for namelists
Selector Length of field Description Note
MQCA_ALTERATION_DATE MQ_DATE_LENGTH Date of most-recent alteration  
MQCA_ALTERATION_TIME MQ_TIME_LENGTH Time of most-recent alteration  
MQCA_NAMELIST_DESC MQ_NAMELIST_DESC_LENGTH Namelist description  
MQCA_NAMELIST_NAME MQ_NAMELIST_NAME_LENGTH Name of namelist object  
MQIA_NAMELIST_TYPE MQLONG Namelist type z/OS
MQCA_NAMES MQ_Q_NAME_LENGTH x Number of names in the list Names in the namelist  
MQIA_NAME_COUNT MQLONG Number of names in the namelist  
MQIA_QSG_DISP MQLONG Queue-sharing group disposition z/OS
Table 3. MQINQ attribute selectors for process definitions
Selector Length of field Description Note
MQCA_ALTERATION_DATE MQ_DATE_LENGTH Date of most-recent alteration  
MQCA_ALTERATION_TIME MQ_TIME_LENGTH Time of most-recent alteration  
MQCA_APPL_ID MQ_PROCESS_APPL_ID_LENGTH Application identifier  
MQCA_ENV_DATA MQ_PROCESS_ENV_DATA_LENGTH Environment data  
MQCA_PROCESS_DESC MQ_PROCESS_DESC_LENGTH Description of process definition  
MQCA_PROCESS_NAME MQ_PROCESS_NAME_LENGTH Name of process definition  
MQCA_USER_DATA MQ_PROCESS_USER_DATA_LENGTH User data  
MQIA_APPL_TYPE MQLONG Application type  
MQIA_QSG_DISP MQLONG Queue-sharing group disposition z/OS
Table 4. MQINQ attribute selectors for the queue manager
Selector Length of field Description Note
MQCA_ALTERATION_DATE MQ_DATE_LENGTH Date of most-recent alteration  
MQCA_ALTERATION_TIME MQ_TIME_LENGTH Time of most-recent alteration  
MQCA_CHANNEL_AUTO_DEF_EXIT MQ_EXIT_NAME_LENGTH Automatic channel definition exit name  
MQCA_CHINIT_SERVICE_PARM Reserved for use by IBM  
MQCA_CLUSTER_WORKLOAD_DATA MQ_EXIT_DATA_LENGTH Data passed to cluster workload exit  
MQCA_CLUSTER_WORKLOAD_EXIT MQ_EXIT_NAME_LENGTH Name of cluster workload exit  
MQCA_COMMAND_INPUT_Q_NAME MQ_Q_NAME_LENGTH System command input queue name  
MQCA_CUSTOM MQ_CUSTOM_LENGTH The custom attribute for new features  
MQCA_DEAD_LETTER_Q_NAME MQ_Q_NAME_LENGTH Name of dead-letter queue  
MQCA_DEF_XMIT_Q_NAME MQ_Q_NAME_LENGTH Default transmission queue name  
MQCA_DNS_GROUP MQ_DNS_GROUP_NAME_LENGTH Name of the group for the TCP listener that handles inbound transmissions for the queue-sharing group to join. The name applies when using Workload Manager Dynamic Domain Name Services. z/OS
MQCA_IGQ_USER_ID MQ_USER_ID_LENGTH Intra-group queuing user identifier z/OS
MQCA_INSTALLATION_DESC MQ_INSTALLATION_DESC_LENGTH Description of the associated installation Not z/OS. Not IBM i
MQCA_INSTALLATION_NAME MQ_INSTALLATION_NAME_LENGTH Name of the installation associated with the queue manager Not z/OS. Not IBM i
MQCA_INSTALLATION_PATH MQ_INSTALLATION_PATH_LENGTH Path where the associated IBM MQ is installed Not z/OS. Not IBM i
MQCA_LU_GROUP_NAME MQ_LU_NAME_LENGTH Generic LU name for the LU 6.2 listener that handles inbound transmissions for the queue-sharing group to use z/OS
MQCA_LU_NAME MQ_LU_NAME_LENGTH Name of the LU to use for outbound LU 6.2 transmissions. Set this name to the same LU that the listener uses for inbound transmissions z/OS
MQCA_LU62_ARM_SUFFIX MQ_ARM_SUFFIX_LENGTH Suffix of the SYS1.PARMLIB member APPCPM xx , that nominates the LUADD for this channel initiator z/OS
MQCA_PARENT MQ_Q_MGR_NAME_LENGTH Name of a hierarchically connected queue manager that is nominated as the parent of this queue manager  
MQCA_Q_MGR_DESC MQ_Q_MGR_DESC_LENGTH Queue manager description  
MQCA_Q_MGR_IDENTIFIER MQ_Q_MGR_IDENTIFIER_LENGT Queue-manager identifier (H)  
MQCA_Q_MGR_NAME MQ_Q_MGR_NAME_LENGTH Name of local queue manager  
MQCA_QSG_NAME MQ_QSG_NAME_LENGTH Queue-sharing group name z/OS
MQCA_REPOSITORY_NAME MQ_CLUSTER_NAME_LENGTH Name of cluster for which queue manager provides repository services  
MQCA_REPOSITORY_NAMELIST MQ_NAMELIST_NAME_LENGTH Name of namelist object containing names of clusters for which queue manager provides repository services  
MQCA_TCP_NAME MQ_TCP_NAME_LENGTH Name of the TCP/IP system that you are using z/OS
MQIA_ACCOUNTING_CONN_OVERRIDE MQLONG Override accounting settings Not z/OS
MQIA_ACCOUNTING_INTERVAL MQLONG How often to write intermediate accounting records Not z/OS
MQIA_ACCOUNTING_MQI MQLONG Controls collection of accounting information for MQI data Not z/OS
MQIA_ACCOUNTING_Q MQLONG Controls collection of accounting information for queues Not z/OS
MQIA_ACTIVE_CHANNELS MQLONG Maximum number of channels that can be active at any time z/OS
MQIA_ADOPTNEWMCA_CHECK MQLONG Elements that are checked to determine whether to adopt an MCA. The check is performed when a new inbound channel is detected that has the same name as an MCA that is already active. z/OS
MQIA_ADOPTNEWMCA_INTERVAL MQLONG Amount of time, in seconds, that the new channel waits for the orphaned channel to end Not z/OS
MQIA_ADOPTNEWMCA_TYPE MQLONG Whether to restart an orphaned instance of an MCA of a particular channel type automatically when a new inbound channel request matching the AdoptNewMCACheck parameters is detected z/OS
MQIA_AUTHORITY_EVENT MQLONG Control attribute for authority events Not z/OS
MQIA_BRIDGE_EVENT MQLONG Control attribute for IMS bridge events z/OS
MQIA_CHANNEL_AUTO_DEF MQLONG Control attribute for automatic channel definition Not z/OS
MQIA_CHANNEL_AUTO_DEF_EVENT MQLONG Control attribute for automatic channel definition events Not z/OS
MQIA_CHANNEL_EVENT MQLONG Control attribute for channel events  
MQIA_CHINIT_ADAPTERS MQLONG Number of adapter subtasks to use for processing IBM MQ calls z/OS
MQIA_CHINIT_DISPATCHERS MQLONG Number of dispatchers to use for the channel initiator z/OS
MQIA_CHINIT_TRACE_AUTO_START MQLONG Whether to start channel initiator trace automatically z/OS
MQIA_CHINIT_TRACE_TABLE_SIZE MQLONG Size of the trace data space (in MB) of the channel initiator z/OS
MQIA_CLUSTER_WORKLOAD_LENGTH MQLONG Cluster workload length.  
MQIA_CLWL_MRU_CHANNELS MQLONG Number of most recently used channels for cluster workload balancing  
MQIA_CLWL_USEQ MQLONG Use remote queues  
MQIA_CODED_CHAR_SET_ID MQLONG Coded character set identifier  
MQIA_COMMAND_EVENT MQLONG Control attribute for command events  
MQIA_COMMAND_LEVEL MQLONG Command level supported by queue manager  
MQIA_CONFIGURATION_EVENT MQLONG Control attribute for configuration events Not z/OS
MQIA_DEF_CLUSTER_XMIT_Q_TYPE MQLONG Default transmission queue type to be used for cluster-sender channels.  
MQIA_DIST_LISTS MQLONG Distribution list support Not z/OS
MQIA_DNS_WLM MQLONG Whether the TCP listener that handles inbound transmissions for the queue-sharing group registers with Workload Manager for Dynamic Domain Name Services z/OS
MQIA_EXPIRY_INTERVAL MQLONG Interval between scans for expired messages z/OS
MQIA_GROUP_UR MQLONG Control attribute for whether GROUP units of recovery are enabled for this queue manager. The GROUP unit of recovery disposition is only available if the queue manager is a member of a queue-sharing group z/OS
MQIA_IGQ_PUT_AUTHORITY MQLONG Intra-group queuing put authority z/OS
MQIA_INHIBIT_EVENT MQLONG Control attribute for inhibit events Not z/OS
MQIA_INTRA_GROUP_queuing MQLONG Intra-group queuing support z/OS
MQIA_LISTENER_TIMER MQLONG Time interval (in seconds) between IBM MQ attempts to restart the listener if APPC or TCP/IP failed. z/OS
MQIA_LOCAL_EVENT MQLONG Control attribute for local events Not z/OS
MQIA_LOGGER_EVENT MQLONG Control attribute for inhibit events Not z/OS
MQIA_LU62_CHANNELS MQLONG Maximum number of channels that can be current, or clients that can be connected, using the LU 6.2 transmission protocol z/OS
MQIA_MSG_MARK_BROWSE_INTERVAL MQLONG Time interval (in milliseconds) after which the queue manager can automatically remove a mark from browse messages.
Attention: You should not set this value below the default of 5000.
 
MQIA_MAX_CHANNELS MQLONG Maximum number of channels that can be current (including server-connection channels with connected clients) z/OS
MQIA_MAX_HANDLES MQLONG Maximum number of handles  
MQIA_MAX_MSG_LENGTH MQLONG Maximum message length  
MQIA_MAX_PRIORITY MQLONG Maximum priority  
MQIA_MAX_UNCOMMITTED_MSGS MQLONG Maximum number of uncommitted messages within a unit of work  
MQIA_OUTBOUND_PORT_MAX MQLONG With MQIA_OUTBOUND_PORT_MIN, defines range of port numbers to use when binding outgoing channels z/OS
MQIA_OUTBOUND_PORT_MIN MQLONG With MQIA_OUTBOUND_PORT_MAX, defines range of port numbers to use when binding outgoing channels z/OS
MQIA_PERFORMANCE_EVENT MQLONG Control attribute for performance events Not z/OS
MQIA_PLATFORM MQLONG Platform on which the queue manager resides  
MQIA_PROT_POLICY_CAPABILITY MQLONG Indicates whether security capabilities of IBM MQ Advanced Message Security are available for a queue manager.  
MQIA_PUBSUB_MAXMSG_RETRY_COUNT MQLONG The number of attempts to reprocess a failed command message under sync point  
MQIA_PUBSUB_MODE MQLONG Whether the publish/subscribe engine and the queued publish/subscribe interface are running. Applications to publish or subscribe using the application programming interface require the publish/subscribe engine. Queues that are monitored by the queued publish/subscribe interface require the queued publish/subscribe interface to be running.  
MQIA_PUBSUB_NP_MSG MQLONG Whether to discard (or keep) an undelivered input message  
MQIA_PUBSUB_NP_RESP MQLONG Controls the behavior of undelivered response messages  
MQIA_PUBSUB_SYNC_PT MQLONG Whether only persistent (or all) messages are processed under sync point  
MQIA_QMGR_CFCONLOS MQLONG Specifies the action to be taken when the queue manager loses connectivity to the administration structure or any CF structures with CFCONLOS set to ASQMGR z/OS
MQIA_RECEIVE_TIMEOUT MQLONG Approximately how long a TCP/IP channel waits to receive data, including heartbeats, from its partner, before returning to the inactive state. The value is numeric, qualified by MQIA_RECEIVE_TIMEOUT_TYPE. z/OS
MQIA_RECEIVE_TIMEOUT_MIN MQLONG Minimum time that a TCP/IP channel waits to receive data, including heartbeats, from its partner, before returning to the inactive state z/OS
MQIA_RECEIVE_TIMEOUT_TYPE MQLONG Approximately how long a TCP/IP channel waits to receive data, including heartbeats, from its partner, before returning to the inactive state. MQIA_RECEIVE_TIMEOUT_TYPE is the qualifier applied to MQIA_RECEIVE_TIMEOUT. z/OS
MQIA_REMOTE_EVENT MQLONG Control attribute for remote events Not z/OS
MQIA_SECURITY_CASE MQLONG Case of security profiles z/OS
MQIA_SSL_EVENT MQLONG Control attribute for channel events  
MQIA_SSL_FIPS_REQUIRED MQLONG Use only FIPS-certified algorithms for cryptography  
MQIA_SSL_RESET_COUNT MQLONG SSL key reset count  
MQIA_START_STOP_EVENT MQLONG Control attribute for start stop events Not z/OS
MQIA_STATISTICS_AUTO_CLUSSDR MQLONG Controls collection of statistics monitoring information for cluster sender channels  
MQIA_STATISTICS_CHANNEL MQLONG Controls collection of statistics data for channels  
MQIA_STATISTICS_INTERVAL MQLONG How often to write statistics monitoring data Not z/OS
MQIA_STATISTICS_MQI MQLONG Controls collection of statistics monitoring information for queue manager Not z/OS
MQIA_STATISTICS_Q MQLONG Controls collection of statistics data for queues Not z/OS
MQIA_SYNCPOINT MQLONG sync point availability  
MQIA_TCP_CHANNELS MQLONG Maximum number of channels that can be current, or clients that can be connected, using the TCP/IP transmission protocol z/OS
MQIA_TCP_KEEP_ALIVE MQLONG Whether to use the TCP KEEPALIVE facility to check that the other end of the connection is still available z/OS
MQIA_TCP_STACK_TYPE MQLONG Whether the channel initiator can use only the TCP/IP address space specified in TCPNAME, or can optionally bind to any selected TCP/IP address z/OS
MQIA_TRACE_ROUTE_RECORDING MQLONG Controls recording of trace-route information z/OS
MQIA_TREE_LIFE_TIME MQLONG Lifetime of unused non-administrative topics  
MQIA_TRIGGER_INTERVAL MQLONG Trigger interval  
IntAttrCount
Type: MQLONG - input

This is the number of elements in the IntAttrs array. Zero is a valid value.

If IntAttrCount is at least the number of MQIA_* selectors in the Selectors parameter, all integer attributes requested are returned.

IntAttrs
Type: MQLONG x IntAttrCount - output

This is an array of IntAttrCount integer attribute values.

Integer attribute values are returned in the same order as the MQIA_* selectors in the Selectors parameter. If the array contains more elements than the number of MQIA_* selectors, the excess elements are unchanged.

If Hobj represents a queue, but an attribute selector does not apply to that type of queue, the specific value MQIAV_NOT_APPLICABLE is returned. It is returned for the corresponding element in the IntAttrs array.

If the IntAttrCount or SelectorCount parameter is zero, IntAttrs is not referred to. In this case, the parameter address passed by programs written in C or S/390 assembler might be null.

CharAttrLength
Type: MQLONG - input

This is the length in bytes of the CharAttrs parameter.

CharAttrLength must be at least the sum of the lengths of the requested character attributes (see Selectors ). Zero is a valid value.

CharAttrs
Type: MQCHAR x CharAttrLength - output

This is the buffer in which the character attributes are returned, concatenated together. The length of the buffer is given by the CharAttrLength parameter.

Character attributes are returned in the same order as the MQCA_* selectors in the Selectors parameter. The length of each attribute string is fixed for each attribute (see Selectors ), and the value in it is padded to the right with blanks if necessary. You can provider a buffer larger than needed to contain all the requested character attributes and padding. The bytes beyond the last attribute value returned are unchanged.

If Hobj represents a queue, but an attribute selector does not apply to that type of queue, a character string consisting entirely of asterisks (*) is returned. The asterisk is returned as the value of that attribute in CharAttrs.

If the CharAttrLength or SelectorCount parameter is zero, CharAttrs is not referred to. In this case, the parameter address passed by programs written in C or S/390 assembler might be null.

CompCode
Type: MQLONG - output
The completion code:
MQCC_OK
Successful completion.
MQCC_WARNING
Warning (partial completion).
MQCC_FAILED
Call failed.
Reason
Type: MQLONG - output
If CompCode is MQCC_OK:
MQRC_NONE
( 0, X'000') No reason to report.
If CompCode is MQCC_WARNING:
MQRC_CHAR_ATTRS_TOO_SHORT
( 2008, X'7D8') Not enough space allowed for character attributes.
MQRC_INT_ATTR_COUNT_TOO_SMALL
( 2022, X'7E6') Not enough space allowed for integer attributes.
MQRC_SELECTOR_NOT_FOR_TYPE
( 2068, X'814') Selector not applicable to queue type.
If CompCode is MQCC_FAILED:
MQRC_ADAPTER_NOT_AVAILABLE
( 2204, X'89C') Adapter not available.
MQRC_ADAPTER_SERV_LOAD_ERROR
( 2130, X'852') Unable to load adapter service module.
MQRC_API_EXIT_ERROR
( 2374, X'946') API exit failed.
MQRC_API_EXIT_LOAD_ERROR
( 2183, X'887') Unable to load API exit.
MQRC_ASID_MISMATCH
( 2157, X'86D') Primary and home ASIDs differ.
MQRC_CALL_IN_PROGRESS
( 2219, X'8AB') MQI call entered before previous call complete.
MQRC_CF_STRUC_FAILED
( 2373, X'945') Coupling-facility structure failed.
MQRC_CF_STRUC_IN_USE
( 2346, X'92A') Coupling-facility structure in use.
MQRC_CHAR_ATTR_LENGTH_ERROR
( 2006, X'7D6') Length of character attributes not valid.
MQRC_CHAR_ATTRS_ERROR
( 2007, X'7D7') Character attributes string not valid.
MQRC_CICS_WAIT_FAILED
( 2140, X'85C') Wait request rejected by CICS.
MQRC_CONNECTION_BROKEN
( 2009, X'7D9') Connection to queue manager lost.
MQRC_CONNECTION_NOT_AUTHORIZED
( 2217, X'8A9') Not authorized for connection.
MQRC_CONNECTION_STOPPING
( 2203, X'89B') Connection shutting down.
MQRC_HCONN_ERROR
( 2018, X'7E2') Connection handle not valid.
MQRC_HOBJ_ERROR
(2019, X'7E3') Object handle not valid.
MQRC_INT_ATTR_COUNT_ERROR
( 2021, X'7E5') Count of integer attributes not valid.
MQRC_INT_ATTRS_ARRAY_ERROR
( 2023, X'7E7') Integer attributes array not valid.
MQRC_NOT_OPEN_FOR_INQUIRE
( 2038, X'7F6') Queue not open for inquire.
MQRC_OBJECT_CHANGED
( 2041, X'7F9') Object definition changed since opened.
MQRC_OBJECT_DAMAGED
( 2101, X'835') Object damaged.
MQRC_PAGESET_ERROR
( 2193, X'891') Error accessing page-set data set.
MQRC_Q_DELETED
( 2052, X'804') Queue deleted.
MQRC_Q_MGR_NAME_ERROR
( 2058, X'80A') Queue manager name not valid or not known.
MQRC_Q_MGR_NOT_AVAILABLE
( 2059, X'80B') Queue manager not available for connection.
MQRC_Q_MGR_STOPPING
( 2162, X'872') Queue manager shutting down.
MQRC_RESOURCE_PROBLEM
( 2102, X'836') Insufficient system resources available.
MQRC_SELECTOR_COUNT_ERROR
( 2065, X'811') Count of selectors not valid.
MQRC_SELECTOR_ERROR
( 2067, X'813') Attribute selector not valid.
MQRC_SELECTOR_LIMIT_EXCEEDED
( 2066, X'812') Count of selectors too large.
MQRC_STORAGE_NOT_AVAILABLE
( 2071, X'817') Insufficient storage available.
MQRC_SUPPRESSED_BY_EXIT
( 2109, X'83D') Call suppressed by exit program.
MQRC_UNEXPECTED_ERROR
( 2195, X'893') Unexpected error occurred.

For detailed information about these codes; see Messages and reason codes

Usage notes

  1. The values returned are a snapshot of the selected attributes. There is no guarantee that the attributes remain the same before the application can act upon the returned values.
  2. When you open a model queue, a dynamic local queue is created. A dynamic local queue is created even if you open the model queue to inquire about its attributes.
    The attributes of the dynamic queue are largely the same as the attributes of the model queue at the time that the dynamic queue is created. If you then use the MQINQ call on this queue, the queue manager returns the attributes of the dynamic queue, and not the attributes of the model queue. See Table 1 for details of which attributes of the model queue are inherited by the dynamic queue.
  3. If the object being inquired is an alias queue, the attribute values returned by the MQINQ call are the attributes of the alias queue. The are not the attributes of the base queue or topic to which the alias resolves.
  4. If the object being inquired is a cluster queue, the attributes that can be inquired depend on how the queue is opened:
    • You can open a cluster queue for inquire plus one or more of the input, browse, or set operations. To do so, there must be a local instance of the cluster queue for the open to succeed. In this case, the attributes that can be inquired are the attributes that are valid for local queues.

      If the cluster queue is open for inquire without input, browse, or set specified, the call returns completion code MQCC_WARNING and reason code MQRC_SELECTOR_NOT_FOR_TYPE (2068) if you attempt to inquire attributes which are valid only for local queues, and not cluster queues.

    • You can open a cluster queue for inquire while passing the base queue manager name of the connected queue manager.

      To do so, there must be a local instance of the cluster queue for the open to succeed. If the base queue manager is not passed, the call returns completion code MQCC_WARNING and reason code MQRC_SELECTOR_NOT_FOR_TYPE (2068) if you attempt to inquire attributes which are valid only for local queues, and not cluster queues

    • If the cluster queue is opened for inquire alone, or inquire and output, only the attributes listed can be inquired. The QType attribute has the value MQQT_CLUSTER in this case:
      • MQCA_Q_DESC
      • MQCA_Q_NAME
      • MQIA_DEF_BIND
      • MQIA_DEF_PERSISTENCE
      • MQIA_DEF_PRIORITY
      • MQIA_INHIBIT_PUT
      • MQIA_Q_TYPE

      You can open the cluster queue with no fixed binding. You can open it with MQOO_BIND_NOT_FIXED specified on the MQOPEN call. Alternatively, specify MQOO_BIND_AS_Q_DEF, and set the DefBind attribute of the queue to MQBND_BIND_NOT_FIXED. If you open a cluster queue with no fixed binding, successive MQINQ calls for the queue might inquire different instances of the cluster queue. However, it is typical for all the instances have the same attribute values.

    • An alias queue object can be defined for a cluster. Because TARGTYPE and TARGET are not cluster attributes, the process performing an MQOPEN process on the alias queue is not aware of the object to which the alias resolves.

      During the initial MQOPEN, the alias queue resolves to a queue manager and a queue in the cluster. Name resolution takes place again at the remote queue manager and it is here that the TARGTPYE of the alias queue is resolved.

      If the alias queue resolves to a topic alias, then publication of messages put to the alias queue takes place at this remote queue manager.

    See Cluster queues
  5. You might want to inquire a number of attributes, and then set some of them using the MQSET call. To program inquire and set efficiently, position the attributes to be set at the beginning of the selector arrays. If you do so, the same arrays with reduced counts can be used for MQSET.
  6. If more than one of the warning situations arise (see the CompCode parameter), the reason code returned is the first one in the following list that applies:
    1. MQRC_SELECTOR_NOT_FOR_TYPE
    2. MQRC_INT_ATTR_COUNT_TOO_SMALL
    3. MQRC_CHAR_ATTRS_TOO_SHORT
  7. The following topic have information about object attributes:

C invocation


MQINQ (Hconn, Hobj, SelectorCount, Selectors, IntAttrCount, IntAttrs,
      CharAttrLength, CharAttrs, &CompCode, &Reason);
Declare the parameters as follows:

MQHCONN  Hconn;           /* Connection handle */
MQHOBJ   Hobj;            /* Object handle */
MQLONG   SelectorCount;   /* Count of selectors */
MQLONG   Selectors[n];    /* Array of attribute selectors */
MQLONG   IntAttrCount;    /* Count of integer attributes */
MQLONG   IntAttrs[n];     /* Array of integer attributes */
MQLONG   CharAttrLength;  /* Length of character attributes buffer */
MQCHAR   CharAttrs[n];    /* Character attributes */
MQLONG   CompCode;        /* Completion code */
MQLONG   Reason;          /* Reason code qualifying CompCode */

COBOL invocation


     CALL 'MQINQ' USING HCONN, HOBJ, SELECTORCOUNT, SELECTORS-TABLE,
                        INTATTRCOUNT, INTATTRS-TABLE, CHARATTRLENGTH,
                        CHARATTRS, COMPCODE, REASON.
Declare the parameters as follows:

**   Connection handle
 01  HCONN            PIC S9(9) BINARY.
**   Object handle
 01  HOBJ             PIC S9(9) BINARY.
**   Count of selectors
 01  SELECTORCOUNT    PIC S9(9) BINARY.
**   Array of attribute selectors
 01  SELECTORS-TABLE.
  02  SELECTORS        PIC S9(9) BINARY OCCURS n TIMES.
**   Count of integer attributes
 01  INTATTRCOUNT     PIC S9(9) BINARY.
**   Array of integer attributes
 01  INTATTRS-TABLE.
  02  INTATTRS         PIC S9(9) BINARY OCCURS n TIMES.
**   Length of character attributes buffer
 01  CHARATTRLENGTH   PIC S9(9) BINARY.
**   Character attributes
 01  CHARATTRS        PIC X(n).
**   Completion code
 01  COMPCODE         PIC S9(9) BINARY.
**   Reason code qualifying COMPCODE
 01  REASON           PIC S9(9) BINARY.

PL/I invocation


call MQINQ (Hconn, Hobj, SelectorCount, Selectors, IntAttrCount,
           IntAttrs, CharAttrLength, CharAttrs, CompCode, Reason);
Declare the parameters as follows:

dcl Hconn           fixed bin(31);  /* Connection handle */
dcl Hobj            fixed bin(31);  /* Object handle */
dcl SelectorCount   fixed bin(31);  /* Count of selectors */
dcl Selectors(n)    fixed bin(31);  /* Array of attribute selectors */
dcl IntAttrCount    fixed bin(31);  /* Count of integer attributes */
dcl IntAttrs(n)     fixed bin(31);  /* Array of integer attributes */
dcl CharAttrLength  fixed bin(31);  /* Length of character attributes
                                       buffer */
dcl CharAttrs       char(n);        /* Character attributes */
dcl CompCode        fixed bin(31);  /* Completion code */
dcl Reason          fixed bin(31);  /* Reason code qualifying
                                       CompCode */

High Level Assembler invocation


         CALL MQINQ,(HCONN,HOBJ,SELECTORCOUNT,SELECTORS,INTATTRCOUNT,  X
               INTATTRS,CHARATTRLENGTH,CHARATTRS,COMPCODE,REASON)
Declare the parameters as follows:

HCONN           DS  F      Connection handle
HOBJ            DS  F      Object handle
SELECTORCOUNT   DS  F      Count of selectors
SELECTORS       DS  (n)F   Array of attribute selectors
INTATTRCOUNT    DS  F      Count of integer attributes
INTATTRS        DS  (n)F   Array of integer attributes
CHARATTRLENGTH  DS  F      Length of character attributes buffer
CHARATTRS       DS  CL(n)  Character attributes
COMPCODE        DS  F      Completion code
REASON          DS  F      Reason code qualifying COMPCODE

Visual Basic invocation


MQINQ Hconn, Hobj, SelectorCount, Selectors, IntAttrCount, IntAttrs,
      CharAttrLength, CharAttrs, CompCode, Reason
Declare the parameters as follows:

Dim Hconn          As Long   'Connection handle'
Dim Hobj           As Long   'Object handle'
Dim SelectorCount  As Long   'Count of selectors'
Dim Selectors      As Long   'Array of attribute selectors'
Dim IntAttrCount   As Long   'Count of integer attributes'
Dim IntAttrs       As Long   'Array of integer attributes'
Dim CharAttrLength As Long   'Length of character attributes buffer'
Dim CharAttrs      As String 'Character attributes'
Dim CompCode       As Long   'Completion code'
Dim Reason         As Long   'Reason code qualifying CompCode'