IBM MQ - Show channel config using the display channel command

by
Jeremy Canfield |
Updated: August 04 2022
| IBM MQ articles
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.
display channel can be used to display all of the channels in the queue manager. In this example, every channel in the queue manager named MANAGER01 will be listed.
echo "display channel(*)" | runmqsc MANAGER01
Following is an example of what will be displayed.
AMQ8414: Display Channel details.
CHANNEL(MANAGER01.CHANNEL01.SVR) CHLTYPE(SVRCONN)
AMQ8414: Display Channel details.
CHANNEL(MANAGER01.CHANNEL02.SVR) CHLTYPE(SVRCONN)
AMQ8414: Display Channel details.
CHANNEL(MANAGER01.CHANNEL03) CHLTYPE(RCVR)
To display the configuration of a channel.
echo "display channel (CHANNEL01)" | runmqsc MANAGER01
Following is an example of what will be displayed.
CHANNEL(CHANNEL01) CHLTYPE(SVRCONN)
ALTDATE(yyyy-mm-dd) ALTTIME(hh.mm.ss)
CERTLABL( ) COMPHDR(NONE)
COMPSMG(NONE) DESCR( )
DISCINT(0) HBINT(300)
KAINT(AUTO) MAXINST(999999999)
MAXINSTC(999999999) MAXMSGL(4194304)
MCAUSER(JohnDoe) MONCHL(QMGR)
RCVDATA( ) RCVEXIT( )
SCYDATA( ) SCYEXIT( )
SENDDATA( ) SENDEXIT( )
SHARECNV(10) SSLCAUTH(REQUIRED)
SSLCIPH( ) SSLPEER( )
TRPTYPE(TCP)
A for loop can be used to loop through all of the channels. Here is an example of how to loop through all of the channels in the queue manager named MANAGER01.
for channel in $(echo "display channel (*)" | runmqsc MANAGER01 | grep -v ^AMQ8414I | grep "CHLTYPE(SVRCONN)" | sed 's|^\s*||g' | sed 's|CHANNEL(||g' | sed 's|).*||g'); do echo $channel; done;
Did you find this article helpful?
If so, consider buying me a coffee over at