
A channel is used to used to make a connection to an IBM MQ queue manager, thus each connection will be associated with a channel.
The display chstatus (or dsp chs) command can be used to display the status of one or more channels in a queue manager. In this example, the name of the queue manager is MANAGER01. Almost always, the status of each channel will be RUNNING, which means there is an active connection to the channel.
~]# echo "display chstatus(*)" | runmqsc MANAGER01
AMQ8417I: Display Channel Status details.
CHANNEL(CHANNEL01) CHLTYPE(SVRCONN)
CONNAME(10.85.189.188) CURRENT
STATUS(RUNNING) SUBSTATE(RECEIVE)
AMQ8417I: Display Channel Status details.
CHANNEL(CHANNEL02) CHLTYPE(SVRCONN)
CONNAME(10.85.189.228) CURRENT
STATUS(RUNNING) SUBSTATE(RECEIVE)
AMQ8417I: Display Channel Status details.
CHANNEL(CHANNEL02) CHLTYPE(SVRCONN)
CONNAME(10.85.189.228) CURRENT
STATUS(RUNNING) SUBSTATE(RECEIVE)
Instead of using the * (wildcard) character, you can use the name of a channel. If the status of the channel is RUNNING, you should get output that looks something like this.
~]# echo "display chstatus('CHANNEL01')" | runmqsc MANAGER01
AMQ8417: Display Channel Status details.
CHANNEL(CHANNEL01) CHLTYPE(SVRCONN)
CONNAME(10.1.2.3) CURRENT
STATUS(RUNNING) SUBSTATE(RECEIVE)
On the other hand, AMQ8420I: ​Channel Status not found should be returned if the channel is not running, meaning there are no active connections to the channel.
~]$ echo "display chstatus ('CHANNEL01')" | runmqsc MQHUBCA1
AMQ8420I: Channel Status not found.
If the stop channel command is used, the status of the channel should be STOPPED.
~]# echo "display chstatus('CHANNEL01')" | runmqsc MANAGER01
AMQ8417: Display Channel Status details.
CHANNEL(CHANNEL01) CHLTYPE(SVRCONN)
CONNAME(10.1.2.3) CURRENT
STATUS(STOPPED) SUBSTATE( )
Status retrying might suggest some issue making a connection. In this scenario, check the error logs.
~]# echo "display chstatus('CHANNEL01')" | runmqsc MANAGER01
AMQ8417: Display Channel Status details.
CHANNEL(CHANNEL01) CHLTYPE(SVRCONN)
CONNAME(10.1.2.3) CURRENT
STATUS(RETRYING) SUBSTATE( )
Here is one possible example of what you might find in the error log.
AMQ9999E: Channel 'CHANNEL01' to host 'mq.example.com' ended abnormally.
Did you find this article helpful?
If so, consider buying me a coffee over at