DISPLAY TOPIC

Use the MQSC command DISPLAY TOPIC to display the attributes of one or more IBM MQ topic objects of any type.


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 Use commands on z/OSĀ®.

Synonym: DIS TOPIC

DISPLAY TOPIC

DISPLAY TOPIC ( generic-topic-name ) WHERE(FilterCondition)
  • ALL
  • CMDSCOPE(' ')CMDSCOPE(qmgr-name)1
  • CMDSCOPE(*)1
  • 2QSGDISP(LIVE)QSGDISP(ALL)QSGDISP(QMGR)QSGDISP(COPY)QSGDISP(GROUP)1
  • QSGDISP(PRIVATE)
  • CLUSINFO
  • TYPE(ALL)TYPE(LOCAL)TYPE(CLUSTER)
  • CLUSTER(generic name)
  • requested attrs
  • Requested attrs,ALTDATEALTTIMECLROUTECLSTATECLUSDATECLUSQMGRCLUSTERCLUSTIMECOMMINFO3
  • CUSTOMDEFPRESPDEFPRTYDEFPSISTDESCRDURSUBMCAST3
  • MDURMDLMNDURMDLNPMSGDLVPMSGDLVPROXYSUBPUBPUBSCOPEQMIDSUBSUBSCOPETOPICSTRTYPEUSEDLQWILDCARD
  • Notes:

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


    Usage notes for DISPLAY TOPIC

    1. On z/OS, the channel initiator must be running before we can display information about cluster topics, using TYPE(CLUSTER) or the CLUSINFO parameter.
    2. The TOPICSTR parameter might contain characters that cannot be translated into printable characters when the command output is displayed.

      On z/OS, these non-printable characters are displayed as blanks.

      On Multiplatforms using the runmqsc command, these non-printable characters are displayed as dots

    3. We can use the following command (or synonym) as an alternative way to display these attributes.
      DISPLAY TCLUSTER
      This command produces the same output as the following command:
      DISPLAY TOPIC TYPE(CLUSTER)
      If you enter the command in this way, do not use the TYPE parameter.


    Parameter descriptions for DISPLAY TOPIC

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

    • All topic definitions
    • One or more topic definitions that match the specified name

      (generic-topic-name)
      The name of the administrative topic definition to be displayed (see Rules for naming IBM MQ objects ). A trailing asterisk (*) matches all administrative topic objects with the specified stem followed by zero or more characters. An asterisk (*) on its own specifies all administrative topic objects.

      WHERE
      Specify a filter condition to display only those administrative topic object definitions 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, or QSGDISP parameters as filter keywords.
        operator
        This part is used to determine whether a topic object 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 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, we can use only EQ or NE.

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

      Note: On z/OS there is a 256 character limit for the filter-value of the MQSC WHERE clause. This limit is not in place for other platforms.

      ALL
      Specify this parameter to display all the attributes. If this parameter is specified, any attributes that are requested specifically have no effect; all attributes are still displayed.

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

      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 value 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 process is the same as entering the command on every queue manager in the queue sharing group.

      We cannot use CMDSCOPE as a filter keyword.

      QSGDISP
      Specifies the disposition of the objects for which information is to be displayed. Values are:

        LIVE
        LIVE is the default value and displays information for objects defined with QSGDISP(QMGR) or QSGDISP(COPY).

        ALL
        Display information for objects defined with QSGDISP(QMGR) or QSGDISP(COPY).

        If there is a shared queue manager environment, and the command is being processed on the queue manager where it was issued, this option also displays information for objects defined with QSGDISP(GROUP).

        If QSGDISP(ALL) is specified in a shared queue manager environment, the command might give duplicated names (with different dispositions).

        In a shared queue manager environment, use
        DISPLAY TOPIC(name) CMDSCOPE(*) QSGDISP(ALL)
        
        to list ALL objects matching name in the queue sharing group without duplicating those objects in the shared repository.

        COPY
        Display information only for objects defined with QSGDISP(COPY).

        GROUP
        Display information only for objects defined with QSGDISP(GROUP). This is allowed only if there is a shared queue manager environment.

        PRIVATE
        Display information only for objects defined with QSGDISP(QMGR) or QSGDISP(COPY). QSGDISP(PRIVATE) displays the same information as QSGDISP(LIVE).

        QMGR
        Display information only for objects defined with QSGDISP(QMGR).

        QSGDISP
        QSGDISP displays one of the following values:

          QMGR
          The object was defined with QSGDISP(QMGR).

          GROUP
          The object was defined with QSGDISP(GROUP).

          COPY
          The object was defined with QSGDISP(COPY).

        We cannot use QSGDISP as a filter keyword.

      CLUSINFO
      Requests that, in addition to information about attributes of topics defined on this queue manager, information about these and other topics in the cluster, that match the selection criteria, is displayed. In this case, there might be multiple topics with the same topic string displayed. The cluster information is obtained from the repository on this queue manager.
      On z/OS, the channel initiator must be running before we can use the CLUSINFO parameter to display information about cluster topics.

      CLUSTER
      Limits the information displayed to topics with the specified cluster name if entered with a value in brackets. The value can be a generic name.

      If we do not enter a value to qualify this parameter, it is treated as a requested parameter, and cluster name information is returned about all the topics displayed.

      On z/OS, the channel initiator must be running before we can use the CLUSINFO parameter to display information about cluster topics.

      TYPE
      Specifies the type of topics to be displayed. Values are:

        ALL
        Display all topic types, including cluster topics if you also specify CLUSINFO.

        LOCAL
        Display locally defined topics.

        CLUSTER
        Display topics that are defined in publish/subscribe clusters. Cluster attributes include:

          CLUSDATE
          The date on which the definition became available to the local queue manager, in the form yyyy-mm-dd.

          CLUSQMGR
          The name of the queue manager hosting the topic.

          CLUSTIME
          The time at which the definition became available to the local queue manager, in the form hh.mm.ss.

          QMID
          The internally generated, unique name of the queue manager hosting the topic.


    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.

    Most of the parameters are relevant for both types of topics, but parameters that are not relevant for a particular type of topic cause no output, nor is an error raised.

    The following table shows the parameters that are relevant for each type of topic. There is a brief description of each parameter after the table, but for more information, see DEFINE TOPIC.

    Table 1. Parameters that can be returned by the DISPLAY TOPIC command
    Local topic Cluster topic
    ALTDATE

    ALTTIME

    CLROUTE

    CLSTATE  

    CLUSDATE  

    CLUSQMGR  

    CLUSTER

    CLUSTIME  

    COMMINFO

     
    CUSTOM

    DEFPRTY

    DEFPSIST

    DEFPRESP

    DESCR

    DURSUB

    MCAST

     
    MDURMDL

    MNDURMDL

    NPMSGDLV

    PMSGDLV

    PROXYSUB

    PUB

    PUBSCOPE

    QMID  

    SUB

    SUBSCOPE

    TOPICSTR

    TYPE

    USEDLQ

     
    WILDCARD

      ALTDATE
      The date on which the definition or information was last altered, in the form yyyy-mm-dd.

      ALTTIME
      The time at which the definition or information was last altered, in the form hh.mm.ss.

      CLROUTE
      The routing behavior to use for topics in the cluster defined by the CLUSTER parameter.

      CLSTATE
      The current state of this topic in the cluster defined by the CLUSTER parameter. The values can be as follows:

        ACTIVE
        The cluster topic is correctly configured and being adhered to by this queue manager.

        PENDING
        Only seen by a hosting queue manager, this state is reported when the topic has been created but the full repository has not yet propagated it to the cluster. This might be because the host queue manager is not connected to a full repository, or because the full repository has deemed the topic to be invalid.

        INVALID
        This clustered topic definition conflicts with an earlier definition in the cluster and is therefore not currently active.

        ERROR
        An error has occurred with respect to this topic object.

      This parameter is typically used to aid diagnosis when multiple definitions of the same clustered topic are defined on different queue managers, and the definitions are not identical. See Routing for publish/subscribe clusters: Notes on behavior.

      CLUSDATE
      The date on which the information became available to the local queue manager, in the form yyyy-mm-dd.

      CLUSQMGR
      The name of the queue manager that hosts the topic.

      CLUSTER
      The name of the cluster that the topic is in.

      CLUSTIME
      The time at which the information became available to the local queue manager, in the form hh.mm.ss.

      COMMINFO
      The communication information object name.

      CUSTOM
      This attribute is reserved for the configuration of new features before separate attributes have been introduced. It can contain the values of zero or more attributes as pairs of attribute name and value in the form NAME(VALUE).

      DEFPRTY
      Default priority of the messages published to this topic.

      DEFPSIST
      Default persistence of messages published to this topic.

      DEFPRESP
      Default put response for this topic. This attribute defines the behavior that must be used by applications when the put response type in the MQPMO options has been set to MQPMO_RESPONSE_AS_TOPIC_DEF.

      DESCR
      Description of this administrative topic object.

      DURSUB
      Determines whether the topic permits durable subscriptions to be made.

      MCAST
      Specifies whether the topic is enabled for multicast.

      MDURMDL
      The name of the model queue for durable managed subscriptions.

      MNDURMDL
      The name of the model queue for non-durable managed subscriptions.

      NPMSGDLV
      The delivery mechanism for non-persistent messages.

      PMSGDLV
      The delivery mechanism for persistent messages.

      PROXYSUB
      Determines whether a proxy subscription is forced for this subscription, even if no local subscriptions exist.

      PUB
      Determines whether the topic is enabled for publication.

      PUBSCOPE
      Determines whether this queue manager propagates publications to queue managers as part of a hierarchy or as part of a publish/subscribe cluster.

      QMID
      The internally generated unique name of the queue manager that hosts the topic.

      SUB
      Determines whether the topic is enabled for subscription.

      SUBSCOPE
      Determines whether this queue manager propagates subscriptions to queue managers as part of a hierarchy or as part of a publish/subscribe cluster.

      TOPICSTR
      The topic string.

      TYPE
      Specifies whether this object is a local topic or cluster topic.

      USEDLQ
      Determines whether the dead-letter queue is used when publication messages cannot be delivered to their correct subscriber queue.

      WILDCARD
      The behavior of wildcard subscriptions with respect to this topic.

    For more details of these parameters, except the CLSTATE parameter, see DEFINE TOPIC.