Inquire Topic

The Inquire Topic (MQCMD_INQUIRE_TOPIC) command inquires about the attributes of existing IBM MQ administrative topic objects


Required parameters

    TopicName (MQCFST)
    Administrative topic object name (parameter identifier: MQCA_TOPIC_NAME).

    Specifies the name of the administrative topic object about which information is to be returned. Generic topic object names are supported. A generic name is a character string followed by an asterisk (*). For example, ABC* selects all administrative topic objects having names that start with the selected character string. An asterisk on its own matches all possible names.

    The maximum length of the string is MQ_TOPIC_NAME_LENGTH.


Optional parameters

    ClusterInfo (MQCFIN)
    Cluster information (parameter identifier: MQIACF_CLUSTER_INFO).

    This parameter requests that, in addition to information about attributes of topics defined on this queue manager, cluster information about these topics and other topics in the repository that match the selection criteria is returned.

    In this case, there might be multiple topics with the same name returned.

    We can set this parameter to any integer value: the value used does not affect the response to the command.

    The cluster information is obtained locally from the queue manager.

    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 is executed on the queue manager on which it was entered.
    • a queue manager name. The command is executed on the queue manager you specify, providing it is active within the queue sharing group. If you specify a queue manager name other than the queue manager on which it was entered, you must be using a queue sharing group environment, and the command server must be enabled.
    • an asterisk (*). The command is executed 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 parameter to filter on.

    IntegerFilterCommand (MQCFIF)
    Integer filter command descriptor. The parameter identifier must be any integer type parameter allowed in TopicAttrs except MQIACF_ALL.

    Use this parameter to restrict the output from the command by specifying a filter condition. See MQCFIF - PCF integer filter parameter for information about using this filter condition.

    If you specify an integer filter, we cannot also specify a string filter using the StringFilterCommand parameter.

    QSGDisposition (MQCFIN)
    Disposition of the object within the group (parameter identifier: MQIA_QSG_DISP). This parameter applies to z/OS only. Specifies the disposition of the object for which information is to be returned (that is, where it is defined and how it behaves). The value can be any of the following values:

      MQQSGD_LIVE
      The object is defined as MQQSGD_Q_MGR or MQQSGD_COPY. MQQSGD_LIVE is the default value if the parameter is not specified.

      MQQSGD_ALL
      The object is defined as MQQSGD_Q_MGR or MQQSGD_COPY.

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

      If MQQSGD_LIVE is specified or defaulted, or if MQQSGD_ALL is specified in a shared queue manager environment, the command might give duplicated names (with different dispositions).

      MQQSGD_COPY
      The object is defined as MQQSGD_COPY.

      MQQSGD_GROUP
      The object is defined as MQQSGD_GROUP. MQQSGD_GROUP is permitted only in a shared queue environment.

      MQQSGD_Q_MGR
      The object is defined as MQQSGD_Q_MGR.

      MQQSGD_PRIVATE
      The object is defined as either MQQSGD_Q_MGR or MQQSGD_COPY. MQQSGD_PRIVATE returns the same information as MQQSGD_LIVE.

    We cannot use QSGDisposition as a parameter to filter on.

    StringFilterCommand (MQCFSF)
    String filter command descriptor. The parameter identifier must be any string type parameter allowed in TopicAttrs except MQCA_TOPIC_NAME. Use this parameter to restrict the output from the command by specifying a filter condition. See MQCFSF - PCF string filter parameter for information about using this filter condition.

    If you specify a string filter, we cannot also specify an integer filter using the IntegerFilterCommand parameter.

    TopicAttrs (MQCFIL)
    Topic object attributes (parameter identifier: MQIACF_TOPIC_ATTRS). The attribute list can specify the following value on its own - default value if the parameter is not specified:

      MQIACF_ALL
      All attributes.

    or a combination of the following:

      MQCA_ALTERATION_DATE
      The date on which the information was last altered.

      MQCA_ALTERATION_TIME
      The time at which the information was last altered.

      MQCA_CLUSTER_NAME
      The cluster that is to be used for the propagation of publications and subscription to publish/subscribe cluster-connected queue managers for this topic.

      MQCA_CLUSTER_DATE
      The date on which this information became available to the local queue manager.

      MQCA_CLUSTER_TIME
      The time at which this information became available to the local queue manager.

      MQCA_CLUSTER_Q_MGR_NAME
      Queue manager that hosts the topic.

      MQCA_CUSTOM
      The custom attribute for new features.

      MQCA_MODEL_DURABLE_Q
      Name of the model queue for durable managed subscriptions.

      MQCA_MODEL_NON_DURABLE_Q
      Name of the model queue for non-durable managed subscriptions.

      MQCA_TOPIC_DESC
      Description of the topic object.

      MQCA_TOPIC_NAME
      Name of the topic object.

      MQCA_TOPIC_STRING
      The topic string for the topic object.

      MQIA_CLUSTER_OBJECT_STATE
      The current state of the clustered topic definition.

      MQIA_CLUSTER_PUB_ROUTE
      The routing behavior of publications between queue managers in a cluster.

      MQIA_DEF_PRIORITY
      Default message priority.

      MQIA_DEF_PUT_RESPONSE_TYPE
      Default put response.

      MQIA_DURABLE_SUB
      Whether durable subscriptions are permitted.

      MQIA_INHIBIT_PUB
      Whether publications are allowed.

      MQIA_INHIBIT_SUB
      Whether subscriptions are allowed.

      MQIA_NPM_DELIVERY
      The delivery mechanism for non-persistent messages.

      MQIA_PM_DELIVERY
      The delivery mechanism for persistent messages.

      MQIA_PROXY_SUB
      Whether a proxy subscription is to be sent for this topic, even if no local subscriptions exist.

      MQIA_PUB_SCOPE
      Whether this queue manager propagates publications to queue managers as part of a hierarchy or a publish/subscribe cluster.

      MQIA_SUB_SCOPE
      Whether this queue manager propagates subscriptions to queue managers as part of a hierarchy or a publish/subscribe cluster.

      MQIA_TOPIC_DEF_PERSISTENCE
      Default message persistence.

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

    TopicType (MQCFIN)
    Cluster information (parameter identifier: MQIA_TOPIC_TYPE).

    If this parameter is present, eligible queues are limited to the specified type. Any attribute selector that is specified in the TopicAttrs list and that is valid only for topics of different type is ignored; no error is raised.

    If this parameter is not present (or if MQIACF_ALL is specified), queues of all types are eligible. Each attribute specified must be a valid topic attribute selector (that is, it must be in the following list), but it need not be applicable to all or any of the topics returned. Topic attribute selectors that are valid but not applicable to the queue are ignored; no error messages occur and no attribute is returned.

    The value can be any of the following values:

      MQTOPT_ALL
      All topic types are displayed. MQTOPT_ALL includes cluster topics, if ClusterInfo is also specified. MQTOPT_ALL is the default value.

      MQTOPT_CLUSTER
      Topics that are defined in publish/subscribe clusters are returned.

      MQTOPT_LOCAL
      Locally defined topics are displayed.