Reputation: 86367
I'm trying to Display IBM MQ channels using
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.ref.adm.doc/q086040_.htm
I defined a channel named MYMQ.SVRCONN
, however, this gives me a syntax error:
runmqsc
DISPLAY CHANNEL MYMQ.SVRCONN
5 : DISPLAY CHANNEL MYMQ.SVRCONN
AMQ8405: Syntax error detected at or near end of command segment below:- DISPLAY CHANNEL
I get the same problem with:
DISPLAY CHANNEL *
Any suggestions why?
I'm struggling to understand this syntax:
>>-DISPLAY CHANNEL--(--generic-channel-name--)------------------>
so bonus points if you can explain how syntax works.
Upvotes: 2
Views: 7594
Reputation: 10672
The (
and )
are part of the required syntax.
In the examples you give the commands should be:
DISPLAY CHANNEL(MYMQ.SVRCONN)
or
DISPLAY CHANNEL(*)
Most MQSC command have a similar syntax of:
<command> <object type>(<object name>) [optional parameters]
A few examples:
DEFINE CHL(MYMQ.SVRCONN) CHLTYPE(SVRCONN) MCAUSER('xyzuser')
ALTER CHL(MYMQ.SVRCONN) CHLTYPE(SVRCONN) DESCR('Test channel')
DISPLAY CHL(MYMQ.SVRCONN) MCAUSER
The QMGR
object is one of the exceptions where the object type does not need to be followed by a object name since when you run these commands you are connected to a specific queue manager:
DIS QMGR CHLAUTH CONNAUTH
ALTER QMGR CHLAUTH(ENABLED)
A few things to note:
'
characters.DISPLAY
commands by default display only a subset of all parameters on an object. You can use the special parameter ALL
to have it display all of them or you can indicate specific parameters you would like to display.DISPLAY
commands can also use a WHERE
clause, for example: DIS CHL(*) WHERE(MCAUSER eq 'xyzuser') DESCR
Upvotes: 4