MQ Command

MQ Command

=============================================================================================
Part 1: Queue Manger Command
=============================================================================================

1. Create Queue Manager
crtmqm QmgrName

2. Start Queue Manager

strmqm QmgrName

3. Run Queue Manager console
runmqsc QmgrName

4. End Queue Manager

endmqm QmgrName

endmqm –i QmgrName

endmqm –p QmgrName

5. Delete Queue Manager

dltmqm QmgrName

6. Change CCSID
ALTER QMGR CCSID(1208)

8. Display Queue Manager
dspmq QmgrName

9. Put message to Queue
amqsput QName QmgrName

10. Get message from Queue
amqsget QName QmgrName

=============================================================================================
Part 2: Queue Command
=============================================================================================

All the command are running under Queue Manager Console

1. Define Local Queue
DEFINE QLOCAL ('QUEUENAME') REPLACE


2. Define Alias Queue
DEFINE QALIAS ('QUEUENAME') TARGQ('TARGQUEUENAME')

3. Define Remote Queue

DEFINE QREMOTE ('QRNAME') RNAME('AAA') RQMNAME('QMGRNAME') XMITQ('QTNAME')

4. Define Model Queue
DEFINE QMODEL(QNAME) DEFTYPE(TEMPDYN)

5. Define transmission Queue

DEFINE QLOCAL(QTNAME) USAGE(XMITQ) DEFPSIST(YES) +
INITQ(SYSTEM.CHANNEL.INITQ)+
PROCESS(PROCESSNAME) REPLACE

6. Delete Queue
DELETE QLOCAL(QNAME)
DELETE QREMOTE(QRNAME)


7. Display queue properties
DISPLAY QUEUE(QNAME) [ALL]

DISPLAY QUEUE(QNAME) DESCR GET PUT

DISPLAY QUEUE(QNAME)MAXDEPTH CURDEPTH

8. Display queue properties

ALTER QMGR DESCR(‘NEW DESCRIPTION’)
ALTER QLOCAL(QNAME) PUT(DISABLED)
ALTER QALIAS(QNAME) TARGQ(TARGQNAME)

9. Clear All Message
CLEAR QLOCAL(QNAME)

 

 

=============================================================================================
Part 3: Channel Command
=============================================================================================

1. Define sender Channel
DEFINE CHANNEL(SDRNAME) CHLTYPE(SDR)+
CONNAME(‘100.100.100.215(1418)’) XMITQ(QTNAME) REPLACE

2. Define receiver Channel
DEFINE CHANNEL(SDR_ TEST) CHLTYPE(RCVR) REPLACE


3. Define server Channel
DEFINE CHANNEL(SVRCONNNAME) CHLTYPE(SVRCONN) REPLACE

4. Start Channel

runmqchl –c ChlName –m QmgrName


=============================================================================================
Part 4: Broker Command
=============================================================================================

1. Create Broker on the Queue Manager
mqsicreatebroker BROKERName -q QmgrName

2. Delete the broker and its associated queue manager:
mqsideletebroker BROKERName

3. Start the ESHB Broker
mqsistart BROKERName

4. Stop Broker
mqsistop BROKERName
 
5. Create the Execution Groups in ESHB Broker
mqsicreateexecutiongroup BROKERName -e EXECUTEGRPName

6. Deploy

mqsideploy  BROKERName -e EXECUTEGRPName -a  Test.bar

你可能感兴趣的:(MQ Command)