DISPLAY CONN

Use the MQSC command DISPLAY CONN to display connection information about the applications connected to the queue manager. This is a useful command because it enables you to identify applications with long-running units of work.

Using MQSC commands

For information on how you use MQSC commands, see Performing local administration tasks using MQSC commands.

You can issue this command from sources 2CR. For an explanation of the source symbols, see Using commands on z/OS®.

Synonym: DIS CONN

DISPLAY CONN

Read syntax diagramSkip visual syntax diagram DISPLAY CONN ( generic-connid ) WHERE(FilterCondition)EXTCONN(generic-connid) ALL CMDSCOPE(' ')1CMDSCOPE(qmgr-name)2TYPE(CONN)TYPE(HANDLE)TYPE(*)TYPE(ALL)URDISP(ALL)1URDISP(GROUP)URDISP(QMGR)connection attributeshandle attributes
Connection attributes
Read syntax diagramSkip visual syntax diagramAPPLDESCAPPLTAGAPPLTYPEASID1ASTATECHANNEL3CLIENTID4CONNAME3CONNOPTSEXTURIDNID1PID4PSBNAME5PSTID5QMURIDTASKNO6TID4TRANSID6UOWLOG4UOWLOGDAUOWLOGTIUOWSTATEUOWSTDAUOWSTTIURTYPEUSERID
Handle attributes
Read syntax diagramSkip visual syntax diagramASTATEDESTDESTQMGRHSTATEOBJNAMEOBJTYPEOPENOPTSQSGDISP1READASUBIDSUBNAMETOPICSTR
Notes:
  • 1 Valid only on z/OS.
  • 2 Valid only when the queue manager is a member of a queue sharing group.
  • 3 Valid only when the connection is associated with a channel.
  • 4 Not valid on z/OS.
  • 5 IMS only.
  • 6 CICS® for z/OS only.

Usage notes for DISPLAY CONN

  1. [z/OS]This command is issued internally by IBM® MQ on z/OS when taking a checkpoint, and when the queue manager is starting and stopping, so that a list of units of work that are in doubt at the time is written to the z/OS console log.
  2. The TOPICSTR parameter might contain characters that cannot be translated into printable characters when the command output is displayed.

    [z/OS]On z/OS, these non-printable characters will be displayed as blanks.

    [UNIX, Linux, Windows, IBM i]On Multiplatforms platforms using runmqsc, these non-printable characters will be displayed as dots.

  3. The state of asynchronous consumers, ASTATE, reflects that of the server-connection proxy on behalf of the client application; it does not reflect the client application state.

From IBM MQ 8.0, there is a change to the data that is returned in the EXTURID field on the results shown for the DISPLAY CONN runmqsc command when there is no XA transaction associated with the connection. Prior to IBM MQ 8.0, if there is no XA transaction associated with the connection then within the EXTURID attribute the XA_FORMATID field would be show as [00000000]. From IBM MQ 8.0, if there is no XA transaction associated with the connection, then the XA_FORMATID value is shown as the empty string [].

Parameter descriptions for DISPLAY CONN

You must specify a connection for which you want to display information. This can be a specific connection identifier or a generic connection identifier. A single asterisk (*) can be used as a generic connection identifier to display information for all connections.

(generic-connid)
The identifier of the connection definition for which information is to be displayed. A single asterisk (*) specifies that information for all connection identifiers is to be displayed.

When an application connects to IBM MQ, it is given a unique 24-byte connection identifier (ConnectionId). The value for CONN is formed by converting the last eight bytes of the ConnectionId to its 16 -character hexadecimal equivalent.

WHERE
Specify a filter condition to display only those connections that satisfy the selection criterion of the filter condition. The filter condition is in three parts: filter-keyword, operator, and filter-value:
filter-keyword
Almost any parameter that can be used to display attributes for this DISPLAY command. However, you cannot use the CMDSCOPE, EXTCONN, QSGDISP, TYPE, and EXTURID parameters as filter keywords.
operator
This is used to determine whether a connection satisfies the filter value on the given filter keyword. The operators are:
LT
Less than
GT
Greater than
EQ
Equal to
NE
Not equal to
LE
Less than or equal to
GE
Greater than or equal to
LK
Matches a generic string that you provide as a filter-value
NL
Does not match a generic string that you provide as a filter-value
CT
Contains a specified item. If the filter-keyword is a list, you can use this to display objects the attributes of which contain the specified item. You cannot use the CONNOPTS value MQCNO_STANDARD_BINDING with this operator.
EX
Does not contain a specified item. If the filter-keyword is a list, you can use this to display objects the attributes of which do not contain the specified item. You cannot use the CONNOPTS value MQCNO_STANDARD_BINDING with this operator.
filter-value
The value that the attribute value must be tested against using the operator. Depending on the filter-keyword, this can be:
  • An explicit value, that is a valid value for the attribute being tested.

    You can use operators LT, GT, EQ, NE, LE or GE only. However, if the attribute value is one from a possible set of values on a parameter (for example, the value NONE on the UOWSTATE parameter), you can only use EQ or NE.

  • A generic value. This is a character string (such as the character string in the APPLTAG parameter) with an asterisk at the end, for example ABC*. If the operator is LK, all items where the attribute value begins with the string (ABC in the example) are listed. If the operator is NL, all items where the attribute value does not begin with the string are listed. Only a single trailing wildcard character (asterisk) is permitted.

    You cannot use a generic filter-value for parameters with numeric values or with one of a set of values.

  • An item in a list of values. Use CT or EX as the operator. For example, if the value DEF is specified with the operator CT, all items where one of the attribute values is DEF are listed.
ALL
Specify this to display all the connection information of the requested type for each specified connection. This is the default if you do not specify a generic identifier, and do not request any specific parameters.
[z/OS]CMDSCOPE
This parameter applies to z/OS only and specifies how the command runs when the queue manager is a member of a queue sharing group.
' '
The command runs on the queue manager on which it was entered. This is the default value.
qmgr-name
The command runs on the queue manager you specify, providing the queue manager is active within the queue sharing group.

You can specify a queue manager name, other than the queue manager on which it was entered, only if you are using a queue sharing group environment and if the command server is enabled.

*
The command runs on the local queue manager and is also passed to every active queue manager in the queue sharing group. The effect of this is the same as entering the command on every queue manager in the queue sharing group.

You cannot use CMDSCOPE as a filter keyword.

EXTCONN
The value for EXTCONN is based on the first sixteen bytes of the ConnectionId converted to its 32 -character hexadecimal equivalent.

Connections are identified by a 24-byte connection identifier. The connection identifier comprises a prefix, which identifies the queue manager, and a suffix which identifies the connection to that queue manager. By default, the prefix is for the queue manager currently being administered, but you can specify a prefix explicitly by using the EXTCONN parameter. Use the CONN parameter to specify the suffix.

When connection identifiers are obtained from other sources, specify the fully qualified connection identifier (both EXTCONN and CONN) to avoid possible problems related to non-unique CONN values.

Do not specify both a generic value for CONN and a non-generic value for EXTCONN.

You cannot use EXTCONN as a filter keyword.

TYPE
Specifies the type of information to be displayed. Values are:
CONN
Connection information for the specified connection.
[z/OS]On z/OS, this includes threads which may be logically or actually disassociated from a connection, together with those that are in-doubt and for which external intervention is needed to resolve them. These latter threads are those that DIS THREAD TYPE(INDOUBT) would show.
HANDLE
Information relating to any objects opened by the specified connection.
*
Display all available information relating to the connection.
ALL
Display all available information relating to the connection.
[z/OS]On z/OS, if you specify TYPE(ALL|*) and WHERE(xxxxx) you only get CONN or HANDLE information returned, based on the WHERE specification. That is, if the xxxxx is a condition relating to handle attributes then only handle attributes for the connection are returned.
URDISP
Specifies the unit of recovery disposition of connections to be displayed. Values are:
ALL
Display all connections. This is the default option.
GROUP
Display only those connections with a GROUP unit of recovery disposition.
QMGR
Display only those connections with a QMGR unit of recovery disposition.

Connection attributes

If TYPE is set to CONN, the following information is always returned for each connection that satisfies the selection criteria, except where indicated:
  • Connection identifier (CONN parameter)
  • Type of information returned (TYPE parameter)
The following parameters can be specified for TYPE(CONN) to request additional information for each connection. If a parameter is specified that is not relevant for the connection, operating environment, or type of information requested, that parameter is ignored.
APPLDESC
A string containing a description of the application connected to the queue manager, where it is known. If the application is not recognized by the queue manager the description returned is blank.
APPLTAG
A string containing the tag of the application connected to the queue manager. It is one of the following:
  • [z/OS] z/OS batch job name
  • [z/OS]TSO USERID
  • CICS APPLID
  • [z/OS] IMS region name
  • Channel initiator job name
  • [IBM i]IBM i job name
  • [UNIX]UNIX process
    Notes:
    • [HP-UX]On HP-UX, if the process name exceeds 14 characters, only the first 14 characters are shown.
    • [Solaris][Linux]On Linux® and Solaris, if the process name exceeds 15 characters, only the first 15 characters are shown.
    • [AIX]On AIX®, if the process name exceeds 28 characters, only the first 28 characters are shown.
  • [Windows]Windows process
    Note: This consists of the full program path and executable file name. If it is more than 28 characters long, only the last 28 characters are shown.
  • Internal queue manager process name
APPLTYPE
A string indicating the type of the application that is connected to the queue manager. It is one of the following:
BATCH
Application using a batch connection
RRSBATCH
RRS-coordinated application using a batch connection
CICS
CICS transaction
IMS
IMS transaction
CHINIT
Channel initiator
[IBM i]OS400
An IBM i application
SYSTEM
Queue manager
SYSTEMEXT
Application performing an extension of function that is provided by the queue manager
[UNIX]UNIX
A UNIX application
USER
A user application
[Windows]WINDOWSNT
A Windows application
[z/OS]ASID
A 4-character address-space identifier of the application identified by APPLTAG. It distinguishes duplicate values of APPLTAG.

This parameter is returned only on z/OS when the APPLTYPE parameter does not have the value SYSTEM.

This parameter is valid only on z/OS.

ASTATE
The state of asynchronous consumption on this connection handle.

Possible values are:

SUSPENDED
An MQCTL call with the Operation parameter set to MQOP_SUSPEND has been issued against the connection handle so that so that asynchronous message consumption is temporarily suspended on this connection.
STARTED
An MQCTL call with the Operation parameter set to MQOP_START has been issued against the connection handle so that asynchronous message consumption can proceed on this connection.
STARTWAIT
An MQCTL call with the Operation parameter set to MQOP_START_WAIT has been issued against the connection handle so that asynchronous message consumption can proceed on this connection.
STOPPED
An MQCTL call with the Operation parameter set to MQOP_STOP has been issued against the connection handle so that asynchronous message consumption cannot currently proceed on this connection.
NONE
No MQCTL call has been issued against the connection handle. Asynchronous message consumption cannot currently proceed on this connection.
CHANNEL
The name of the channel that owns the connection. If there is no channel associated with the connection, this parameter is blank.
[UNIX, Linux, Windows, IBM i]CLIENTID
The client ID of the client that is using the connection. If there is no client ID associated with the connection, this parameter is blank.
CONNAME
The connection name associated with the channel that owns the connection. If there is no channel associated with the connection, this parameter is blank.
CONNOPTS
The connect options currently in force for this application connection. Possible values are:
  • MQCNO_ACCOUNTING_Q_DISABLED
  • MQCNO_ACCOUNTING_Q_ENABLED
  • MQCNO_ACCOUNTING_MQI_DISABLED
  • MQCNO_ACCOUNTING_MQI_ENABLED
  • MQCNO_FASTPATH_BINDING
  • MQCNO_HANDLE_SHARE_BLOCK
  • MQCNO_HANDLE_SHARE_NO_BLOCK
  • MQCNO_HANDLE_SHARE_NONE
  • MQCNO_ISOLATED_BINDING
  • MQCNO_RECONNECT
  • MQCNO_RECONNECT_Q_MGR
  • MQCNO_RESTRICT_CONN_TAG_Q_MGR
  • MQCNO_RESTRICT_CONN_TAG_QSG
  • MQCNO_SERIALIZE_CONN_TAG_Q_MGR
  • MQCNO_SERIALIZE_CONN_TAG_QSG
  • MQCNO_SHARED_BINDING
  • MQCNO_STANDARD_BINDING

The values displayed for MQCNO_RECONNECT and MQCNO_RECONNECT_Q_MGR are only displayed if the application specifies them explicitly. If the values are picked up from an mqclient.ini file setting or the CLNTCONN channel definition, then neither value is displayed.

You cannot use the value MQCNO_STANDARD_BINDING as a filter value with the CT and EX operators on the WHERE parameter.

EXTURID
The external unit of recovery identifier associated with this connection. Its format is determined by the value of URTYPE.

You cannot use EXTURID as a filter keyword.

[z/OS]NID
Origin identifier, set only if the value of UOWSTATE is UNRESOLVED. This is a unique token identifying the unit of work within the queue manager. It is of the form origin-node.origin-urid where
  • origin-node identifies the originator of the thread, except in the case where APPLTYPE is set to RRSBATCH, when it is omitted.
  • origin-urid is the hexadecimal number assigned to the unit of recovery by the originating system for the specific thread to be resolved.

This parameter is valid only on z/OS.

PID
Number specifying the process identifier of the application that is connected to the queue manager.

[z/OS]This parameter is not valid on z/OS.

[z/OS]PSBNAME
The 8-character name of the program specification block (PSB) associated with the running IMS transaction. You can use the PSBNAME and PSTID to purge the transaction using IMS commands. It is valid on z/OS only.

This parameter is returned only when the APPLTYPE parameter has the value IMS.

[z/OS]PSTID
The 4-character IMS program specification table (PST) region identifier for the connected IMS region. It is valid on z/OS only.

This parameter is returned only when the APPLTYPE parameter has the value IMS.

QMURID
The queue manager unit of recovery identifier.
[z/OS]On z/OS, this is an 8-byte log RBA, displayed as 16 hexadecimal characters.
[UNIX, Linux, Windows, IBM i]On Multiplatforms, this is an 8-byte transaction identifier, displayed as m.n where m and n are the decimal representation of the first and last 4 bytes of the transaction identifier.

[z/OS]You can use QMURID as a filter keyword. On z/OS, you must specify the filter value as a hexadecimal string.

[UNIX, Linux, Windows, IBM i]On platforms other than z/OS, you must specify the filter value as a pair of decimal numbers separated by a period (.). You can only use the EQ, NE, GT, LT, GE, or LE filter operators.

[z/OS]However, on z/OS, if log shunting has taken place, as indicated by message CSQR026I, instead of the RBA you have to use the URID from the message.

[z/OS]TASKNO
A 7-digit CICS task number. This number can be used in the CICS command "CEMT SET TASK(taskno) PURGE" to end the CICS task. This parameter is valid on z/OS only.

This parameter is returned only when the APPLTYPE parameter has the value CICS.

TID
Number specifying the thread identifier within the application process that has opened the specified queue.

[z/OS]This parameter is not valid on z/OS.

[z/OS]TRANSID
A 4-character CICS transaction identifier. This parameter is valid only on z/OS.

This parameter is returned only when the APPLTYPE parameter has the value CICS.

[UNIX, Linux, Windows, IBM i]UOWLOG
The file name of the extent to which the transaction associated with this connection first wrote.

[UNIX, Linux, Windows, IBM i]This parameter is valid only on Multiplatforms.

UOWLOGDA
The date that the transaction associated with the current connection first wrote to the log.
UOWLOGTI
The time that the transaction associated with the current connection first wrote to the log.
UOWSTATE
The state of the unit of work. It is one of the following:
NONE
There is no unit of work.
ACTIVE
The unit of work is active.
PREPARED
The unit of work is in the process of being committed.
[z/OS]UNRESOLVED
The unit of work is in the second phase of a two-phase commit operation. IBM MQ holds resources on its behalf and external intervention is required to resolve it. This might be as simple as starting the recovery coordinator (such as CICS, IMS, or RRS) or it might involve a more complex operation such as using the RESOLVE INDOUBT command. The UNRESOLVED value can occur only on z/OS.
UOWSTDA
The date that the transaction associated with the current connection was started.
UOWSTTI
The time that the transaction associated with the current connection was started.
URTYPE
The type of unit of recovery as seen by the queue manager. It is one of the following:
  • [z/OS] CICS (valid only on z/OS )
  • XA
  • [z/OS]RRS (valid only on z/OS )
  • [z/OS] IMS (valid only on z/OS )
  • QMGR

URTYPE identifies the EXTURID type and not the type of the transaction coordinator. When URTYPE is QMGR, the associated identifier is in QMURID (and not EXTURID).

USERID
The user identifier associated with the connection.

This parameter is not returned when APPLTYPE has the value SYSTEM.

Handle attributes

If TYPE is set to HANDLE, the following information is always returned for each connection that satisfies the selection criteria, except where indicated:
  • Connection identifier (CONN parameter)
  • Read ahead status (DEFREADA parameter)
  • Type of information returned (TYPE parameter)
  • Handle status (HSTATE)
  • Object name (OBJNAME parameter)
  • Object type (OBJTYPE parameter)
The following parameters can be specified for TYPE(HANDLE) to request additional information for each queue. If a parameter is specified that is not relevant for the connection, operating environment, or type of status information requested, that parameter is ignored.
ASTATE
The state of the asynchronous consumer on this object handle.

Possible values are:

ACTIVE
An MQCB call has set up a function to call back to process messages asynchronously and the connection handle has been started so that asynchronous message consumption can proceed.
INACTIVE
An MQCB call has set up a function to call back to process messages asynchronously but the connection handle has not yet been started, or has been stopped or suspended, so that asynchronous message consumption cannot currently proceed.
SUSPENDED
The asynchronous consumption callback has been suspended so that asynchronous message consumption cannot currently proceed on this object handle. This can be either because an MQCB call with Operation MQOP_SUSPEND has been issued against this object handle by the application, or because it has been suspended by the system. If it has been suspended by the system, as part of the process of suspending asynchronous message consumption the callback function will be called with the reason code that describes the problem resulting in suspension. This will be reported in the Reason field in the MQCBC structure that is passed to the callback function.

For asynchronous message consumption to proceed, the application must issue an MQCB call with the Operation parameter set to MQOP_RESUME.

SUSPTEMP
The asynchronous consumption callback has been temporarily suspended by the system so that asynchronous message consumption cannot currently proceed on this object handle. As part of the process of suspending asynchronous message consumption, the callback function will be called with the reason code that describes the problem resulting in suspension. This will be reported in the Reason field in the MQCBC structure passed to the callback function.

The callback function will be called again when asynchronous message consumption is resumed by the system, when the temporary condition has been resolved.

NONE
An MQCB call has not been issued against this handle, so no asynchronous message consumption is configured on this handle.
DEST
The destination queue for messages that are published to this subscription. This parameter is only relevant for handles of subscriptions to topics. It is not returned for other handles.
DESTQMGR
The destination queue manager for messages that are published to this subscription. This parameter is relevant only for handles of subscriptions to topics. It is not returned for other handles. If DEST is a queue that is hosted on the local queue manager, this parameter will contain the local queue manager name. If DEST is a queue that is hosted on a remote queue manager, this parameter will contain the name of the remote queue manager.
HSTATE
The state of the handle.
Possible values are:
ACTIVE
An API call from this connection is currently in progress for this object. If the object is a queue, this condition can arise when an MQGET WAIT call is in progress.

If there is an MQGET SIGNAL outstanding, then this does not mean, by itself, that the handle is active.

INACTIVE
No API call from this connection is currently in progress for this object. If the object is a queue, this condition can arise when no MQGET WAIT call is in progress.
OBJNAME
The name of an object that the connection has open.
OBJTYPE
The type of the object that the connection has open. If this handle is that of a subscription to a topic, then the SUBID parameter identifies the subscription. You can then use the DISPLAY SUB command to find all the details about the subscription.
It is one of the following:
  • QUEUE
  • PROCESS
  • QMGR
  • [z/OS]STGCLASS (valid only on z/OS )
  • NAMELIST
  • CHANNEL
  • AUTHINFO
  • TOPIC
OPENOPTS
The open options currently in force for the connection for the object. This parameter is not returned for a subscription. Use the value in the SUBID parameter and the DISPLAY SUB command to find the details about the subscription.
Possible values are:
MQOO_INPUT_AS_Q_DEF
Open queue to get messages using queue-defined default.
MQOO_INPUT_SHARED
Open queue to get messages with shared access.
MQOO_INPUT_EXCLUSIVE
Open queue to get messages with exclusive access.
MQOO_BROWSE
Open queue to browse messages.
MQOO_OUTPUT
Open queue or topic to put messages.
MQOO_INQUIRE
Open queue to inquire attributes.
MQOO_SET
Open queue to set attributes.
MQOO_BIND_ON_OPEN
Bind handle to destination when queue is found.
MQOO_BIND_NOT_FIXED
Do not bind to a specific destination.
MQOO_SAVE_ALL_CONTEXT
Save context when message retrieved.
MQOO_PASS_IDENTITY_CONTEXT
Allow identity context to be passed.
MQOO_PASS_ALL_CONTEXT
Allow all context to be passed.
MQOO_SET_IDENTITY_CONTEXT
Allow identity context to be set.
MQOO_SET_ALL_CONTEXT
Allow all context to be set.
MQOO_ALTERNATE_USER_AUTHORITY
Validate with specified user identifier.
MQOO_FAIL_IF_QUIESCING
Fail if queue manager is quiescing.
[z/OS]QSGDISP
Indicates the disposition of the object. It is valid on z/OS only. The value is one of the following:
QMGR
The object was defined with QSGDISP(QMGR).
COPY
The object was defined with QSGDISP(COPY).
SHARED
The object was defined with QSGDISP(SHARED).

You cannot use QSGDISP as a filter keyword.

READA
The read ahead connection status.
Possible values are:
NO
Read ahead of non-persistent messages is not enabled for this object.
YES
Read ahead of non-persistent message is enabled for this object and is being used efficiently.
BACKLOG
Read ahead of non-persistent messages is enabled for this object. Read ahead is not being used efficiently because the client has been sent a large number of messages which are not being consumed.
INHIBITED
Read ahead was requested by the application but has been inhibited because of incompatible options specified on the first MQGET call.
SUBID
The internal, all-time unique identifier of the subscription. This parameter is relevant only for handles of subscriptions to topics. It is not returned for other handles.

Not all subscriptions show up in DISPLAY CONN; only those that have current handles open to the subscription show up. You can use the DISPLAY SUB command to see all subscriptions.

SUBNAME
The application's unique subscription name that is associated with the handle. This parameter is relevant only for handles of subscriptions to topics. It is not returned for other handles. Not all subscriptions will have a subscription name.
TOPICSTR
The resolved topic string. This parameter is relevant for handles with OBJTYPE(TOPIC). For any other object type, this parameter is not returned.

Full attributes

If TYPE is set to *, or ALL, both Connection attributes and Handle attributes are returned for each connection that satisfies the selection criteria.