Inquire Topic Status
The Inquire Topic Status (MQCMD_INQUIRE_TOPIC_STATUS) command inquires the status of a particular topic, or of a topic and its child topics. The Inquire Topic Status command has a required parameter. The Inquire Topic Status command has optional parameters.
Required parameters
- TopicString (MQCFST)
- The topic string (parameter identifier: MQCA_TOPIC_STRING).
The name of the topic string to display. IBM MQ uses the topic wildcard characters ('#' and '+') and does not treat a trailing asterisk as a wildcard. For more information about using wildcard characters, refer to the related topic.
The maximum length of the string is MQ_TOPIC_STR_LENGTH.
Optional parameters
- CommandScope (MQCFST)
- Command scope (parameter identifier: MQCACF_COMMAND_SCOPE). This parameter applies to z/OS only.
Specifies how the command is executed when the queue manager is a member of a queue sharing group. We can specify one of the following:
- Blank (or omit the parameter altogether). The command runs on the queue manager on which you enter it.
- A queue manager name. The command runs on the queue manager that you specify, if it is active within the queue sharing group. If you specify a queue manager name other than the queue manager on which you entered the command, we must be using a queue sharing group environment, and the command server must be enabled.
- An asterisk (*). The command runs on the local queue manager and is also passed to every active queue manager in the queue sharing group.
The maximum length is MQ_QSG_NAME_LENGTH.
We cannot use CommandScope as a filter parameter.
- IntegerFilterCommand (MQCFIF)
- Integer filter command descriptor that we use to restrict the output from the command. The
parameter identifier must be an integer type and must be one of the values allowed for
MQIACF_TOPIC_SUB_STATUS,
MQIACF_TOPIC_PUB_STATUS or
MQIACF_TOPIC_STATUS, except
MQIACF_ALL.
If you specify an integer filter, we cannot also specify a string filter with the StringFilterCommand parameter.
- StatusType (MQCFIN)
- The type of status to return (parameter identifier: MQIACF_TOPIC_STATUS_TYPE).
The value can be:
- MQIACF_TOPIC_STATUS
- MQIACF_TOPIC_SUB
- MQIACF_TOPIC_PUB
This command ignores any attribute selectors specified in the TopicStatusAttrs list that are not valid for the selected StatusType and the command raises no error.
The default value if this parameter is not specified is MQIACF_TOPIC_STATUS.
- StringFilterCommand (MQCFSF)
- String filter command descriptor. The parameter identifier must be any string type parameter allowed for MQIACF_TOPIC_SUB_STATUS, MQIACF_TOPIC_PUB_STATUS or MQIACF_TOPIC_STATUS, except MQIACF_ALL, or the identifier MQCA_TOPIC_STRING_FILTER to filter on the topic string.
- TopicStatusAttrs (MQCFIL)
- Topic status attributes (parameter identifier: MQIACF_TOPIC_STATUS_ATTRS)
The default value used if the parameter is not specified is:
- MQIACF_ALL
We can specify any of the parameter values listed in Inquire Topic Status (Response). It is not an error to request status information that is not relevant for a particular status type, but the response contains no information for the value concerned.
Parent topic: Definitions of the Programmable Command Formats