Inquire Channel Names
The Inquire Channel Names (MQCMD_INQUIRE_CHANNEL_NAMES) command inquires a list of IBM MQ channel names that match the generic channel name, and the optional channel type specified.
Required parameters
- ChannelName (MQCFST)
- Channel name (parameter identifier: MQCACH_CHANNEL_NAME).
Generic channel names are supported. A generic name is a character string followed by an asterisk (*), for example ABC*, and it selects all 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_CHANNEL_NAME_LENGTH.
Optional parameters
- ChannelType (MQCFIN)
- Channel type (parameter identifier: MQIACH_CHANNEL_TYPE).
If present, this parameter limits the channel names returned to channels of the specified type.
The value can be any of the following values:- MQCHT_SENDER
- Sender.
- MQCHT_SERVER
- Server.
- MQCHT_RECEIVER
- Receiver.
- MQCHT_REQUESTER
- Requester.
- MQCHT_SVRCONN
- Server-connection (for use by clients).
- MQCHT_CLNTCONN
- Client connection.
- MQCHT_CLUSRCVR
- Cluster-receiver.
- MQCHT_CLUSSDR
- Cluster-sender.
- MQCHT_ALL
- All types.
The default value if this parameter is not specified is MQCHT_ALL, which means that channels of all types except MQCHT_CLNTCONN are eligible.
- 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, we 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.
- 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 with either MQQSGD_Q_MGR or MQQSGD_COPY. MQQSGD_PRIVATE returns the same information as MQQSGD_LIVE.
Error code
This command might return the following error code in the response format header, in addition to the values shown in Error codes applicable to all commands.
- Reason (MQLONG)
- The value can be any of the following values:
- MQRCCF_CHANNEL_NAME_ERROR
- Channel name error.
- MQRCCF_CHANNEL_TYPE_ERROR
- Channel type not valid.
Parent topic: Definitions of the Programmable Command Formats