DISPLAY SBSTATUS

Use the MQSC command DISPLAY SBSTATUS to display the status of a subscription.


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 CR. For an explanation of the source symbols, see Use commands on z/OSĀ®.

Synonym: DIS SBSTATUS

DISPLAY SBSTATUS

DISPLAY SBSTATUS (generic name)
  • SUBID(string)
  • WHERE(FilterCondition)
  • ALL
  • DURABLE(ALLNOYES
  • )
  • SUBTYPE ( USERPROXYADMINAPIALL
  • ) status attrs
  • CMDSCOPE(' ')1
  • CMDSCOPE(qmgr-name)1
  • CMDSCOPE(*)2
  • Status attributes ,ACTCONNDURABLELMSGDATELMSGTIMEMCASTREL3
  • NUMMSGSRESMDATERESMTIMESUBTYPESUBUSERTOPICSTR
  • Notes:

    • 1 Valid only on z/OS.
    • 2 Valid only on z/OS when the queue manager is a member of a queue-sharing group.
    • 3 Not valid on z/OS.


    Parameter descriptions for DISPLAY SBSTATUS

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

    • All subscription definitions
    • One or more subscriptions that match the specified name

      (generic-name)
      The local name of the subscription definition to be displayed. A trailing asterisk (*) matches all subscriptions with the specified stem followed by zero or more characters. An asterisk (*) on its own specifies all subscriptions.

      WHERE
      Specify a filter condition to display only those subscriptions 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 parameter as a filter keyword.
        Subscriptions of a type for which the filter keyword is not a valid attribute are not displayed.
        operator
        This is used to determine whether a subscription 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

        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.

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

        • A generic value. This is a character string (such as the character string you supply for the SUBUSER 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.

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

      ALL
      Display all the status information for each specified subscription definition. This is the default if we do not specify a generic name, and do not request any specific parameters.

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

      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. CMDSCOPE must be blank, or the local queue manager, if QSGDISP is set to 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.

        We can specify a queue manager name, other than the queue manager on which the command 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.

      We cannot use CMDSCOPE as a filter keyword.

      DURABLE
      Specify this attribute to restrict the type of subscriptions which are displayed.

        ALL
        Display all subscriptions.

        NO
        Only information about nondurable subscriptions is displayed.

        YES
        Only information about durable subscriptions is displayed.

      SUBTYPE
      Specify this attribute to restrict the type of subscriptions which are displayed.

        USER
        Displays only API and ADMIN subscriptions.

        PROXY
        Only system created subscriptions relating to inter-queue manager subscriptions are selected.

        ADMIN
        Only subscriptions that have been created by an administration interface or modified by an administration interface are selected.

        API
        Only subscriptions created by applications using an IBM MQ API call are selected.

        ALL
        All subscription types are displayed (no restriction).


    Requested parameters

    Specify one or more parameters that define the data to be displayed. The parameters can be specified in any order, but do not specify the same parameter more than once.

      ACTCONN
      Returns the ConnId of the HConn that currently has this subscription open.

      DURABLE
      A durable subscription is not deleted when the creating application closes its subscription handle.

        NO
        The subscription is removed when the application that created it is closed or disconnected from the queue manager.

        YES
        The subscription persists even when the creating application is no longer running or has been disconnected. The subscription is reinstated when the queue manager restarts.

      LMSGDATE
      The date on which a message was last published to the destination specified by this subscription.

      LMSGTIME
      The time on which a message was last published to the destination specified by this subscription.

      MCASTREL
      Indicator of the reliability of the multicast messages.
      The values are expressed as a percentage. A value of 100 indicates that all messages are being delivered without problems. A value less than 100 indicates that some of the messages are experiencing network issues. To determine the nature of these issues we can enable event message generation, using the COMMEV parameter of the COMMINFO objects, and examine the generated event messages.
      The following two values are returned:

      • The first value is based on recent activity over a short period.
      • The second value is based on activity over a longer period.
      If no measurement is available the values are shown as blanks.

      NUMMSGS
      The number of messages put to the destination specified by this subscription since it was created, or since the queue manager was restarted, whichever is more recent. This number might not reflect the total number of messages that are, or have been, available to the consuming application. This is because it might also include publications that were partially processed but then undone by the queue manager due to a publication failure, or publications that were made within syncpoint that were rolled-back by the publishing application.

      RESMDATE
      The date of the most recent MQSUB API call that connected to the subscription.

      RESMTIME
      The time of the most recent MQSUB API call that connected to the subscription.

      SUBID( string )
      The internal, unique key identifying a subscription.

      SUBUSER( string )
      The owing user ID of the subscription.

      SUBTYPE
      Indicates how the subscription was created.

        PROXY
        An internally created subscription used for routing publications through a queue manager.

        ADMIN
        Created using the DEF SUB MQSC or PCF command. This SUBTYPE also indicates that a subscription has been modified using an administrative command.

        API
        Created using an MQSUB API call.

      TOPICSTR
      Returns the fully resolved topic string of the subscription.

    For more details of these parameters, see DEFINE SUB.