MQINQ

Queries the attributes of a WebSphere MQ object (queue, process definition, queue manager).

Syntax

CALL MQINQ(hConn, hObj, compCode, reason, parms, value1 ,value2, ...>);

Required Arguments

hConn
Numeric, input
Specifies the WebSphere MQ connection handle that is obtained from a previous MQCONN function call.
hObj
Numeric, input
Specifies the WebSphere MQ Object handle that is obtained from a previous MQOPEN function call that specified the INQUIRE option. This handle can represent a queue, process definition, or queue manager object.
compCode
Numeric, output
Returns the WebSphere MQ completion code. This parameter can be used to determine whether an error occurred during the execution of this routine. If an error occurred, then the compCode parameter will be nonzero, and the reason parameter will be set to the appropriate reason code.
reason
Numeric, output
Returns the WebSphere MQ reason code that qualifies the completion code.
Note: A reason code of -1 reflects a Base SAS internal error, not a WebSphere MQ error. To obtain a textual description of a failure (either Base SAS or WebSphere MQ), use the SYSMSG() Base SAS function call.
parms
Character, input
Specifies a string of attributes that you want to query from the WebSphere MQ object. Each object attribute is separated by a comma. The value that is associated with each attribute is returned in a value parameter. Not all attributes are valid for each type of object (queue, process definition, or queue manager). Valid object types are listed under each attribute.
value
Numeric or character, output
Returns the value for an attribute specified in the parms string. You must provide a value parameter for each attribute specified parms string. Variables used to store character values should be initialized appropriately to guarantee that truncation of a returned value does not occur.
The attributes in the following three tables are valid.
Attributes for Queues
Attribute
Data Type
Description
ALTERATION_DATE
Character12
Date definition last changed
ALTERATION_TIME
Character8
Time definition was last changed
BACKOUT_REQ_Q_NAME
Character48
Excessive backout requeue name
BACKOUT_THRESHOLD
Numeric
Backout threshold
BASE_Q_NAME
Character48
Name of queue to which alias resolves
CF_STRUC_NAME
Character12
Coupling-facility structure name (z/OS only)
CLUSTER_NAME
Character48
Name of cluster to which queue belongs
CLUSTER_NAMELIST
Character48
Name of namelist containing names of clusters to which queue belongs
CLUSTER_WORKLOAD_DATA
Character32
User data for cluster workload exit
CLUSTER_WORKLOAD_LENGTH
Numeric
Maximum length of message data passed to cluster workload exit
CREATION_DATE
Character12
Queue creation date
CREATION_TIME
Character8
Queue creation time
CURRENT_Q_DEPTH
Numeric
Number of messages on queue
DEF_BIND
Numeric
Default binding
DEF_INPUT_OPEN_OPTION
Numeric
Default open-for-input option
DEF_PERSISTENCE
Numeric
Default message persistence
DEF_PRIORITY
Numeric
Default message priority
DEF_XMIT_Q_NAME
Character48
Default transmission queue name
DEFINITION_TYPE
Numeric
Queue definition type
EXPIRY_INTERVAL
Numeric
Interval between scans for expired messages (z/OS only)
HARDEN_GET_BACKOUT
Numeric
Whether to harden backout count
IGQ_PUT_AUTHORITY
Numeric
Intra-group queuing put authority (z/OS only)
IGQ_USER_ID
Character12
Intra-group queuing agent user ID (z/OS only)
INDEX_TYPE
Numeric
Index type (z/OS only)
INHIBIT_GET
Numeric
Whether get operations are allowed
This output type is not supported on z/OS.
INHIBIT_PUT
Numeric
Whether put operations are allowed
INITIATION_Q_NAME
Character48
Initiation queue name
INTRA_GROUP_QUEUING
Numeric
Intra-group queuing support (z/OS only)
MAX_MSG_LENGTH
Numeric
Maximum message length
MAX_Q_DEPTH
Numeric
Maximum number of messages allowed on queue
MSG_DELIVERY_SEQUENCE
Numeric
Whether message priority is relevant
OPEN_INPUT_COUNT
Numeric
Number of MQOPEN calls that have the queue open for input
OPEN_OUTPUT_COUNT
Numeric
Number of MQOPEN calls that have the queue open for output
PROCESS_NAME
Character32
Name of process definition
Q_DEPTH_HIGH_EVENT
Numeric
Control attribute for queue depth high events
This output type is not supported on z/OS.
Q_DEPTH_HIGH_LIMIT
Numeric
High limit for queue depth
This output type is not supported on z/OS.
Q_DEPTH_LOW_EVENT
Numeric
Control attribute for queue depth low events
This output type is not supported on z/OS.
Q_DEPTH_LOW_LIMIT
Numeric
Low limit for queue depth
This output type is not supported on z/OS.
Q_DEPTH_MAX_EVENT
Numeric
Control attribute for queue depth max events
This output type is not supported on z/OS.
Q_DESC
Character64
Queue description
Q_NAME
Character48
Queue name
Q_SERVICE_INTERVAL
Numeric
Limit for queue service interval
This output type is not supported on z/OS.
Q_SERVICE_INTERVAL_EVENT
Numeric
Control for queue service interval events
This output type is not supported on z/OS.
Q_TYPE
Numeric
Queue type
QSG_DISP
Numeric
Queue-sharing group disposition (z/OS only)
QSG_NAME
Character4
Name of queue-sharing group (z/OS only)
REMOTE_Q_MGR_NAME
Character48
Name of remote queue manager
REMOTE_Q_NAME
Character48
Name of remote queue as known on remote queue manager
RETENTION_INTERVAL
Numeric
Queue retention interval
SCOPE
Numeric
Queue definition scope
This output type is not supported on z/OS.
SHAREABILITY
Numeric
Whether queue can be shared
STORAGE_CLASS
Character8
Storage class for queue (z/OS only)
TRIGGER_CONTROL
Numeric
Trigger control
TRIGGER_DATA
Character64
Trigger data
TRIGGER_DEPTH
Numeric
Trigger depth
TRIGGER_MSG_PRIORITY
Numeric
Threshold message priority for triggers
TRIGGER_TYPE
Numeric
Trigger type
USAGE
Numeric
Usage
XMIT_Q_NAME
Character48
Default transmission queue name
Attributes for Queue Managers
Attribute
Data Type
Description
ACTIVE_CHANNELS
Numeric
Maximum number of active channels
This output type is supported on z/OS only.
AUTHORITY_EVENT
Numeric
Control attribute for authority events
This output type is not supported on z/OS.
CLUSTER_WORKLOAD_EXIT (MQ_EXIT_NAME_LENGTH)
Character Variable Length
Name of user exit for cluster workload management
CODED_CHAR_SET_ID
Numeric
Coded character set identifier
COMMAND_INPUT_Q_NAME
Character48
System command input queue name
COMMAND_LEVEL
Numeric
Command level supported by queue manager
DEAD_LETTER_Q_NAME
Character48
Dead letter queue name
INHIBIT_EVENT
Numeric
Control attribute for inhibit events
This output type is not supported on z/OS.
LOCAL_EVENT
Numeric
Control attribute for local events
This output type is not supported on z/OS.
MAX_CHANNELS
Numeric
Maximum number of current channels
This output type is supported on z/OS only.
MAX_HANDLES
Numeric
Maximum number of handles
MAX_MSG_LENGTH
Numeric
Maximum message length
MAX_PRIORITY
Numeric
Maximum priority
MAX_UNCOMMITTED_MSGS
Numeric
Maximum number of uncommitted messages within a unit of work
This output type is not supported on z/OS.
PERFORMANCE_EVENT
Numeric
Control attribute for performance events
This output type is not supported on z/OS.
PLATFORM
Numeric
Platform on which the queue manager resides
Q_MGR_DESC
Character64
Queue manager description
Q_MGR_IDENTIFIER
Character48
Unique internally generated identifier of queue manager
Q_MGR_NAME
Character48
Queue manager name
REMOTE_EVENT
Numeric
(Queue Manager)
Control attribute for remote events
This output type is not supported on z/OS.
REPOSITORY_NAME
Character48
Name of cluster for which this queue manager provides repository services
REPOSITORY_NAMELIST
Character48
Name of namelist object containing names of clusters for which this queue manager provides repository services
SYNCPOINT
Numeric
(Queue Manager)
Synchpoint availability
START_STOP_EVENT
Numeric
(Queue Manager)
Control attribute for start stop events
This output type is not supported on z/OS.
TCP_CHANNELS
Numeric
Maximum number of current channels and TCP/IP client connections
This output type is supported on z/OS only.
TRIGGER_INTERVAL
Numeric
(Queue Manager)
Trigger interval
Attributes for Process Definitions
Attribute
Data Type
Description
APPL_ID
Character256
Application identifier
APPL_TYPE
Numeric
(Process Definition)
Application type
ENV_DATA
Character128
Environment data
PROCESS_DESC
Character48
Description of process definition
PROCESS_NAME
Character32
Name of process definition
USER_DATA
Character128
User data

Example

This example queries about a queue's maximum depth and the maximum message length.
length parms $ 30;
compCode=0;
reason=0;
parms="MAX_Q_DEPTH,MAX_MSG_LENGTH";
CALL MQINQ(hConn, hObj, compCode,
reason, parms, maxdepth,
maxmsgl);