DISPLAY TOPIC (display topic information)
Use the MQSC command DISPLAY TOPIC to display the attributes of one or more IBM® MQ topic objects of any type.
Using MQSC commands
For information on how you use MQSC commands, see Administering IBM MQ using MQSC commands.
You can issue this command from sources 2CR. For an explanation of the source symbols, see Sources from which you can issue MQSC and PCF commands on IBM MQ for z/OS®.
Syntax diagram for DISPLAY TOPIC
Usage notes for DISPLAY TOPIC
On z/OS, the channel initiator
must be running before you can display information about cluster topics, using
TYPE(CLUSTER) or the CLUSINFO parameter. - 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 - You can use the following command (or synonym) as an alternative way to display these
attributes.
This command produces the same output as the following command:DISPLAY TCLUSTER
If you enter the command in this way, do not use the TYPE parameter.DISPLAY TOPIC TYPE(CLUSTER)
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, you 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, you 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.
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, you 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.
You cannot use a generic filter-value for parameters with numeric values or with one of a set of values.
- An explicit value, that is a valid value for the attribute being tested.
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 you 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.
You 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.
You 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
to list ALL objects matchingDISPLAY TOPIC(name) CMDSCOPE(*) QSGDISP(ALL)namein 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).
- 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.
- 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 you 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.
- TYPE
-
Specifies the type of
topics that you want 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 (define a new administrative topic).
| Local topic | Cluster topic | |
|---|---|---|
| ALTDATE |
|
|
| ALTTIME |
|
|
| CLROUTE |
|
|
| CLSTATE |
|
|
| CLUSDATE |
|
|
| CLUSQMGR |
|
|
| CLUSTER |
|
|
| CLUSTIME |
|
|
| COMMINFO |
|
|
| CUSTOM |
|
|
| DEFPRTY |
|
|
| DEFPSIST |
|
|
| DEFPRESP |
|
|
| DESCR |
|
|
| DURSUB |
|
|
| MCAST |
|
|
| MDURMDL |
|
|
| MNDURMDL |
|
|
| NPMSGDLV |
|
|
OTELPCTL |
![]() |
|
OTELTRAC |
![]() |
|
| 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.
- CAPEXPRY
- The maximum time, expressed in tenths of a second, which a message put on an object handle,
opened using this object on the resolution path, remains in the system until it becomes eligible for
expiry processing.For more information on message expiry processing, see CAPEXPRY: Limit message expiry time.
- integer
- The value must be in the range one through to 999 999 999.
- NOLIMIT
- There is no limit on the expiry time of messages put to this topic.
- ASPARENT
- The maximum message expiry time is based on the setting of the closest parent administrative topic object in the topic tree. This is the default value.
- 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.
- 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 contains name-value pairs that have the form NAME(VALUE). The value is a list of zero or more properties-value pairs, in MQSC-style syntax, separated by at least one space. Attribute names beginning with IBM, AMQ, CSQ, or MQ are reserved for IBM use only. The additional reserved attributes are CAPEXPRY, SQGETTMR, and PAGEVAL.
- 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.
![[z/OS]](ngzos.gif)
OTELPCTL- Whether
the queue manager automatically propagates trace context from the application environment to the
message on MQPUT.
Can be one of the following values:
- ASPARENT
- The default for everything other than SYSTEM.BASE.TOPIC, delegate to the parent topic’s configuration.
- QMGR
- The value of OTELPCTL on the queue manager is used. This is the default for SYSTEM.BASE.TOPIC.
- MANUAL
- Automatic propagation doesn’t occur. If required, applications can manually propagate trace context properties.
- AUTO
- Automatic propagation occurs if the application is in an environment that supports automatic propagation. If the queue manager is in a queue sharing group, this value can only be set if all queue managers have been started at IBM MQ 9.4.5 or later. Otherwise, the command fails and messages CSQM532I and CSQM533I are issued in the queue manager job log, to identify the queue managers that do not support OTELPCTL.
For more information on automatic propagation, see Trace propagation.
This parameter is valid only on z/OS.
![[z/OS]](ngzos.gif)
OTELTRAC- Whether
the queue manager emits spans as messages are published to this
topic.
Can be one of the following values:
- ASPARENT
- The default for everything other than SYSTEM.BASE.TOPIC, delegate to the parent topic’s configuration.
- QMGR
- The value of OTELTRAC on the queue manager is used. This is the default for SYSTEM.BASE.TOPIC.
- OFF
- Spans are not emitted even if messages have trace context.
- ON
- Spans are emitted if messages have trace context.
For more information on span emission, see Span emission.
This parameter is valid only on z/OS.
- 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.
