DISPLAY QSTATUS

Use the MQSC command DISPLAY QSTATUS to display the status of one or more queues.


Use MQSC commands

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

We can issue this command from sources 2CR. For an explanation of the source symbols, see Sources from which we can issue MQSC commands on z/OS .

Synonym: DIS QS


DISPLAY QSTATUS

DISPLAY QSTATUS ( generic-qname ) WHERE(FilterCondition) ALL CMDSCOPE(' ')CMDSCOPE(qmgr-name)1CMDSCOPE(*)12 MONITOR TYPE(QUEUE)TYPE(HANDLE)OPENTYPE(ALL)OPENTYPE(INPUT)OPENTYPE(OUTPUT)queue statushandle statusQueue status,CURDEPTHCURFSIZE3CURMAXFS3IPPROCSLGETDATE4LGETTIME4LPUTDATE4LPUTTIME4MEDIALOG3MONQ4MSGAGE4OPPROCSQSGDISP2QTIME4UNCOMHandle status,APPLDESCAPPLTAGAPPLTYPEASID2ASTATEBROWSECHANNEL5CONNAME5HSTATEINPUTINQUIREOUTPUTPID3PSBNAME6PSTID6QMURIDQSGDISP2SETTASKNO7TID3TRANSID7URIDURTYPEUSERIDNotes:

  • 1 Valid only on z/OS when the queue manager is a member of a queue sharing group.
  • 2 Valid on z/OS only.
  • 3 Not valid on z/OS.
  • 4 Also displayed by selection of the MONITOR parameter.
  • 5 Channel initiator only
  • 6 IMS only
  • 7 CICS only


Usage notes for DISPLAY QSTATUS

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.


Parameter descriptions for DISPLAY QSTATUS

We must specify the name of the queue for which we want to display status information. This name can either be a specific queue name or a generic queue name. By using a generic queue name you can display either:

  • Status information for all queues, or
  • Status information for one or more queues that match the specified name and other selection criteria

We must also specify whether we want status information about:

  • Queues
  • Handles that are accessing the queues

Note: We cannot use the DISPLAY QSTATUS command to display the status of an alias queue or remote queue. If you specify the name of one of these types of queue, no data is returned. We can, however, specify the name of the local queue or transmission queue to which the alias queue or remote queue resolves.

    ( generic-qname )
    The name of the queue for which status information is to be displayed. A trailing asterisk (*) matches all queues with the specified stem followed by zero or more characters. An asterisk (*) on its own matches all queues.

    WHERE
    Specify a filter condition to display status information for queues 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, we cannot use the CMDSCOPE, MONITOR, OPENTYPE, QSGDISP, QTIME, TYPE, or URID parameters as filter keywords.

      operator
      The operator is used to determine whether a queue 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, we can use this filter to display objects whose attributes contain the specified item.

        EX
        Does not contain a specified item. If the filter-keyword is a list, we can use this filter to display objects whose attributes do not contain the specified item.

      filter-value
      The value that the attribute value must be tested against using the operator. Depending on the filter-keyword, this value can be:

      • An explicit value, that is a valid value for the attribute being tested.

        We 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 NO on the UNCOM parameter), we can only use EQ or NE.

      • A generic value. This value 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.

        We 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. The operator must be CT or EX. If it is a character value, it can be explicit or generic. For example, if the value DEF is specified with the operator CT, all items where one of the attribute values is DEF are listed. If ABC* is specified, all items where one of the attribute values begins with ABC are listed.

    ALL
    Display all the status information for each specified queue.

    This value is the default if we do not specify a generic name, and do not request any specific parameters.

    On z/OS, this value is also the default if we specify a filter condition using the WHERE parameter, but on other platforms only the requested attributes are displayed.

    CMDSCOPE
    This parameter specifies how the command runs when the queue manager is a member of a queue sharing group. It is valid on z/OS only.

      ' '
      The command runs on the queue manager on which it was entered. This value is the default.

      qmgr-name
      The command runs on the queue manager you specify, providing the queue manager is active within the queue sharing group.

      We can specify a queue manager name, other than the queue manager on which the command was entered, only if we 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 value is the same as entering the command on every queue manager in the queue sharing group.

    We cannot use CMDSCOPE as a filter keyword.

    MONITOR
    Specify this value to return the set of online monitoring parameters. These are LGETDATE, LGETTIME, LPUTDATE, LPUTTIME, MONQ, MSGAGE, and QTIME. If you specify this parameter, any of the monitoring parameters that you request specifically have no effect; all monitoring parameters are still displayed.

    OPENTYPE
    Restricts the queues selected to queues which have handles with the specified type of access:

      ALL
      Selects queues that are open with any type of access. This value is the default if the OPENTYPE parameter is not specified.

      INPUT
      Selects queues that are open for input only. This option does not select queues that are open for browse.

      OUTPUT
      Selects queues that are open only for output.

    The OPENTYPE parameter is valid only if TYPE(HANDLE) is also specified.

    We cannot use OPENTYPE as a filter keyword.

    TYPE
    Specifies the type of status information required:

      QUEUE
      Status information relating to queues is displayed. This value is the default if the TYPE parameter is not specified.

      HANDLE
      Status information relating to the handles that are accessing the queues is displayed.

    We cannot use TYPE as a filter keyword.


Queue status

For queue status, the following information is always returned for each queue that satisfies the selection criteria, except where indicated:

  • Queue name
  • Type of information returned (TYPE parameter)
  • Current queue depth (CURDEPTH parameter) on platforms other than z/OS
  • On z/OS only, the queue sharing group disposition (QSGDISP parameter)

The following parameters can be specified for TYPE(QUEUE) to request additional information for each queue. If a parameter is specified that is not relevant for the queue, operating environment, or type of status information requested, that parameter is ignored.

    CURDEPTH
    The current depth of the queue, that is, the number of messages on the queue, including both committed messages and uncommitted messages.

    CURFSIZE
    Indicates the current size of the queue file in megabytes, rounded up to the nearest megabyte.

    For a new queue with default attributes, the value of CURFSIZE is 1.

    CURMAXFS
    Indicates the current maximum size the queue file can grow to, rounded up to the nearest megabyte, given the current block size in use on a queue. The use of this field is two fold:

    • If you set MAXFSIZE(DEFAULT) for the current block size, CURMAXFS shows the actual value that DEFAULT equates to.
    • If CURMAXFS does not match MAXFSIZE, you know the queue must be drained in order to adopt a bigger granularity.

    IPPROCS
    The number of handles that are currently open for input for the queue (either input-shared or input-exclusive). This number does not include handles that are open for browse.

    For shared queues, the number returned applies only to the queue manager generating the reply. The number is not the total for all the queue managers in the queue sharing group.

    LGETDATE
    The date on which the last message was retrieved from the queue since the queue manager started. A message being browsed does not count as a message being retrieved. When no get date is available, perhaps because no message has been retrieved from the queue since the queue manager was started, the value is shown as a blank.
    For queues with QSGDISP(SHARED), the value shown is for measurements collected on this queue manager only.

    This parameter is also displayed when you specify the MONITOR parameter.

    A value is only displayed for this parameter if MONQ is set to a value other than OFF for this queue.

    LGETTIME
    The time at which the last message was retrieved from the queue since the queue manager started. A message being browsed does not count as a message being retrieved. When no get time is available, perhaps because no message has been retrieved from the queue since the queue manager was started, the value is shown as a blank.
    For queues with QSGDISP(SHARED), the value shown is for measurements collected on this queue manager only.

    This parameter is also displayed when you specify the MONITOR parameter.

    A value is only displayed for this parameter if MONQ is set to a value other than OFF for this queue.

    LPUTDATE
    The date on which the last message was put to the queue since the queue manager started. When no put date is available, perhaps because no message has been put to the queue since the queue manager was started, the value is shown as a blank.
    For queues with QSGDISP(SHARED), the value shown is for measurements collected on this queue manager only.

    This parameter is also displayed when you specify the MONITOR parameter.

    A value is only displayed for this parameter if MONQ is set to a value other than OFF for this queue.

    LPUTTIME
    The time at which the last message was put to the queue since the queue manager started. When no put time is available, perhaps because no message has been put to the queue since the queue manager was started, the value is shown as a blank.
    For queues with QSGDISP(SHARED), the value shown is for measurements collected on this queue manager only.

    This parameter is also displayed when you specify the MONITOR parameter.

    A value is only displayed for this parameter if MONQ is set to a value other than OFF for this queue.

    Note: Moving the system clock backwards should be avoided in case the LPUTTIME is being used to monitor the messages. The LPUTTIME of a queue is only updated when a message that arrives on the queue has a PutTime greater than the existing value of LPUTTIME. Because the PutTime of the message is less than the existing LPUTTIME of the queue in this case, the time is left unchanged.

    MEDIALOG
    The log extent or journal receiver needed for media recovery of the queue. On queue managers on which circular logging is in place, MEDIALOG is returned as a null string.

    This parameter is valid only on Multiplatforms.

    MONQ
    Current level of monitoring data collection for the queue.

    This parameter is also displayed when you specify the MONITOR parameter.

    MSGAGE
    Age, in seconds, of the oldest message on the queue. The maximum displayable value is 999999999; if the age exceeds this value, 999999999 is displayed.

    This parameter is also displayed when you specify the MONITOR parameter.

    A value is only displayed for this parameter if MONQ is set to a value other than OFF for this queue.

    OPPROCS
    This is the number of handles that are currently open for output for the queue.

    For shared queues, the number returned applies only to the queue manager generating the reply. The number is not the total for all the queue managers in the queue sharing group.

    QSGDISP
    Indicates the disposition of the queue. The value displayed 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).

    This parameter is valid on z/OS only.

    For shared queues, if the CF structure used by the queue is unavailable or has failed, the status information might be unreliable.

    We cannot use QSGDISP as a filter keyword.

    QTIME
    Interval, in microseconds, between messages being put on the queue and then being destructively read. The maximum displayable value is 999999999; if the interval exceeds this value, 999999999 is displayed.

    The interval is measured from the time that the message is placed on the queue until it is destructively retrieved by an application and, therefore, includes any interval caused by a delay in committing by the putting application.

    Two values are displayed and these are recalculated only when messages are processed:

    • A value based on the last few messages processed
    • A value based on a larger sample of the recently processed messages

    These values depend on the configuration and behavior of our system, as well as the levels of activity within it, and serve as an indicator that the system is performing normally. A significant variation in these values might indicate a problem with the system. For queues with QSGDISP(SHARED), the values shown are for measurements collected on this queue manager only.

    This parameter is also displayed when you specify the MONITOR parameter.

    A value is only displayed for this parameter if MONQ is set to a value other than OFF for this queue.

    UNCOM
    Indicates whether there are any uncommitted changes (puts and gets) pending for the queue. The value displayed is one of the following:

      YES

      On z/OS, there are one or more uncommitted changes pending.

      NO
      There are no uncommitted changes pending.

      n
      On Multiplatforms, an integer value indicating how many uncommitted changes are pending.

    For shared queues, the value returned applies only to the queue manager generating the reply. The value does not apply to all the queue managers in the queue sharing group.


Handle status

For handle status, the following information is always returned for each queue that satisfies the selection criteria, except where indicated:

  • Queue name
  • Type of information returned (TYPE parameter)
  • User identifier (USERID parameter) - not returned for APPLTYPE(SYSTEM)
  • Process ID (PID parameter)
  • Thread ID (TID parameter)
  • Application tag (APPLTAG parameter)
  • Application type (APPLTYPE parameter)
  • Whether the handle provides input access (INPUT parameter)
  • Whether the handle provides output access (OUTPUT parameter)
  • Whether the handle provides browse access (BROWSE parameter)
  • Whether the handle provides inquire access (INQUIRE parameter)
  • Whether the handle provides set access (SET parameter)

The following parameters can be specified for TYPE(HANDLE) to request additional information for each queue. If a parameter that is not relevant is specified for the queue, operating environment, or type of status 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 batch job name
    • TSO USERID
    • CICS APPLID
    • IMS region name
    • Channel initiator job name
    • IBM i job name
    • UNIX process
    • Windows process Note: The returned value consists of the full program path and executable file name. If it is more than 28 characters long, only the first 28 characters are shown.
    • Internal queue manager process name

    Application name represents the name of the process or job that has connected to the queue manager. In the instance that this process or job is connected via a channel, the application name represents the remote process or job rather than the local channel process or job 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

      SYSTEM
      Queue manager

      SYSTEMEXT
      Application performing an extension of function that is provided by the queue manager

      USER
      A user application

    ASID
    A four-character address-space identifier of the application identified by APPLTAG. It distinguishes duplicate values of APPLTAG.

    This parameter is returned only when the queue manager owning the queue is running on z/OS, and the APPLTYPE parameter does not have the value SYSTEM.

    ASTATE
    The state of the asynchronous consumer on this queue.

    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 call-back has been suspended so that asynchronous message consumption cannot currently proceed on this queue. 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 call-back function is initiated with the reason code that describes the problem resulting in suspension. This code is reported in the Reason field in the MQCBC structure that is passed to the call-back 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 call-back has been temporarily suspended by the system so that asynchronous message consumption cannot currently proceed on this queue. As part of the process of suspending asynchronous message consumption, the call-back function is called with the reason code that describes the problem resulting in suspension. This code is reported in the Reason field in the MQCBC structure passed to the call-back function.

      The call-back function is initiated 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.

    BROWSE
    Indicates whether the handle is providing browse access to the queue. The value is one of the following:

      YES
      The handle is providing browse access.

      NO
      The handle is not providing browse access.

    CHANNEL
    The name of the channel that owns the handle. If there is no channel associated with the handle, this parameter is blank.

    This parameter is returned only when the handle belongs to the channel initiator.

    CONNAME
    The connection name associated with the channel that owns the handle. If there is no channel associated with the handle, this parameter is blank.

    This parameter is returned only when the handle belongs to the channel initiator.

    HSTATE
    Whether an API call is in progress. Possible values are:

      ACTIVE
      An API call from a connection is currently in progress for this object. For a queue, this condition can arise when an MQGET WAIT call is in progress.

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

      INACTIVE
      No API call from a connection is currently in progress for this object. For a queue, this condition can arise when no MQGET WAIT call is in progress.

    INPUT
    Indicates whether the handle is providing input access to the queue. The value is one of the following:

      SHARED
      The handle is providing shared-input access.

      EXCL
      The handle is providing exclusive-input access.

      NO
      The handle is not providing input access.

    INQUIRE
    Indicates whether the handle currently provides inquire access to the queue. The value is one of the following:

      YES
      The handle provides inquire access.

      NO
      The handle does not provide inquire access.

    OUTPUT
    Indicates whether the handle is providing output access to the queue. The value is one of the following:

      YES
      The handle is providing output access.

      NO
      The handle is not providing output access.

    PID
    Number specifying the process identifier of the application that has opened the specified queue.

    This parameter is not valid on z/OS.

    PSBNAME
    The eight characters long name of the program specification block (PSB) associated with the running IMS transaction. We 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.

    PSTID
    The four 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. On z/OS, this value is an 8-byte log RBA, displayed as 16 hexadecimal characters. On platforms other than z/OS, this value 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.

    We can use QMURID as a filter keyword. On z/OS, we must specify the filter value as a hexadecimal string. On platforms other than z/OS, we must specify the filter value as a pair of decimal numbers separated by a period (.). We can only use the EQ, NE, GT, LT, GE, or LE filter operators.

    QSGDISP
    Indicates the disposition of the queue. 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).

    We cannot use QSGDISP as a filter keyword.

    SET
    Indicates whether the handle is providing set access to the queue. The value is one of the following:

      YES
      The handle is providing set access.

      NO
      The handle is not providing set access.

    TASKNO
    A seven-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.

    This parameter is not valid on z/OS.

    An asterisk indicates that this queue was opened using a shared connection.

    For further information about shared connections see Shared (thread independent) connections with MQCONNX .

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

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

    URID
    The external unit of recovery identifier associated with the connection. It is the recovery identifier known in the external syncpoint coordinator. Its format is determined by the value of URTYPE.

    We cannot use URID as a filter keyword.

    URTYPE
    The type of unit of recovery as seen by the queue manager. It is one of the following:

    • CICS (valid only on z/OS )
    • XA
    • RRS (valid only on 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 URID).

    USERID
    The user identifier associated with the handle.

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

Parent topic: MQSC commands