MQ COMMANDS
REFRESH
RESET
CLUSTER
CHANNE
L
CLUSTER
SECURITY
RESOLV
E
CHANNEL
RESUME
START
STOP
SUSPEND
QMGR
CLUSTER
QMGR
CLUSNL
CHANNEL
CHANNEL
QMGR CLUSTER
CHINIT
LISTENER
QMGR CLUSNL
LISTENER
SERVICE
SERVICE
CONN
QMGR
Description
To Display mq version
To Display all MQ's
To create a queue manager
To Start a Queue Mgr
TO
To Start a QMgr automatically when os
starts
Disable QMgr starting automatically
Normal shutdown
Immediate Shutdown
Command
$ DSPMQVER
$ DSPMQ
$ crtmqm -q -d MY.DEFAULT.XMIT.QUEUE u DEAD.LETTER.QUEUE QM1
$ STRTMQM qmgrname
$ AMQMDAIN AUTO <QMgr>
$AMQMDAIN MANUAL <QMgr>
endmqm <QMGR>
endmqm -i <QMGR>
To Display information about a specific
QMGR
To enterinto a queumanager or
runmqsc mode
To come out or exit RUNMQSC mode
To put a msg in queue (Shud be out of
RUNMQSC cmd mode)
To get or read a msg from queue
To Publish a topic onto a queue
manager
To Subsribe a topic from a queue
Display Command Server status on a
QMgr
START/Stop Command server
Run the command server
Queue Commands
To subscribe to a topic onto a queue
manager
$ DSPMQ -M qmgrname
To Display Queue properties
To Display queue status
To alter/change queue properties
$ DISPLAY QL('ql1')
$ DISPLAY QSTATUS('lq1') TYPE(QUEUE) ALL
ALTER QUEUETYPE <queuename> PUT(ENABLED)
$ ALTER QL('ql1') PUT(ENABLED)
ALTER QUEUETYPE< queuename> PUT(ENABLED) GET
(DISABLED) MAXDEPTH(max no.of msgs)
$ ALTER QL('ql1') PUT(ENABLED) GET(DISABLED)
MAXDEPTh(10)
$ MQRC 2085
$ DEFINE QALIAS('aliasqueuename')
TARGET('targetqueuename')
$ DEFINE QR(QMGR1.RQ) RNAME(QMGR2.LQ)
To alter multiple queue properties at a
time
To display mq reason codes
To Create alias queue go to runmqsc
mode
To Create a Remote Queue
$ RUNMQSC qmgrname
$ END
$ AMQSPUT <queuename> <queuemgrname>
$AMQSGET <queuename> <queuemgrname>
Syntax:- AMQPUB <TOPICNAME> <QMGRNAME>
$ AMQSPUB DELL.TOPIC QMGR1
$ AMQSSUB DELL.TOPIC QMGR1
$ DSPMQCSV <Qmgr>
STRMQCSV / DSPMQCSV/ ENDMQCSV <Qmgr>
$ RUNMQSC <Qmgr>
$ AMQSSUB DELL.TOPIC QMGR1
To clear local queues (Note: clear
command will work only on local
queues)
Display Current Queue Depth
To browse or display a msg
Inactivate the channel
Display channel Status
Start channel
Stop Channel
Define Sender chanel
Define Receiver Channel
Resolve channel
Reset channel (sdr channel only)
Create a listener
Start the listener
Display listener status
Open MQ Browser
RQMNAME(QMGR2) XMITQ(QMGR2))
$ CLEAR QL('ql1')
$ DIS QL(QueueName) CURDPTH
$ AMQSBCG
$ STOP CHANNEL(CH.QMGR1.QMGR2)
STATUS(INACTIVE)
$ DIS CHSTATUS (channel name)
$ START CHANNEL (CH.QMGR1.QMGR2)
$ STOP CHANNEL(CH.QM1.QM2) STATUS(INACTIVE)
$ DEFINE CHANNEL(CH.QMGR1.QMGR2) CHLTYPE(SDR)
CONNAME('localhost(2240)') XMITQ(QMGR2)
$ DEFINE CHL(CH.QMGR1.QMGR2) CHLTYPE(RCVR)
$ RESOLVE CHL(CHName) ACTION(COMMIT/BACKOUT)
$ RESET CHANNEL(CHNAME) SEQNUM(1)
$ DEFINE LSTR(QMGR2.LSTR) TRPTYPE(TCP)
PORT(2240)
$ START LSTR(QMGR2.LSTR)
$ DIS LSSTATUS(QMGR2.LSTR)
$ STRMQCFG
25. What is the command used for stopping the Queue manager?
$ endmqm -w QMName
The command waits until all applications have stopped and the queue manager has
ended.
$ endmqm i QMName
This type of shutdown does not wait for applications to disconnect from the queue
manager.