Friday, 9 November 2012

Distribution in MQ using Commands


C:\Documents and Settings\miracle>CRTMQM QM1
WebSphere MQ queue manager created.
Directory 'C:\Program Files\IBM\WebSphere MQ\qmgrs\QM1' created.
Creating or replacing default objects for QM1.
Default objects statistics : 68 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.

C:\Documents and Settings\miracle>strmqm QM1
WebSphere MQ queue manager 'QM1' starting.
5 log records accessed on queue manager 'QM1' during the log replay phase.
Log replay for queue manager 'QM1' complete.
Transaction manager state recovered for queue manager 'QM1'.
WebSphere MQ queue manager 'QM1' started.

C:\Documents and Settings\miracle>runmqsc QM1
5724-H72 (C) Copyright IBM Corp. 1994, 2009.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager QM1.


define Listener(ch1) trptype(tcp) port(1000)
     1 : define Listener(ch1) trptype(tcp) port(1000)
AMQ8626: WebSphere MQ listener created.

START Listener(ch1)
     2 : START liSTENER(ch1)
AMQ8021: Request to start WebSphere MQ Listener accepted.

Define channel(sr) chltype(SDR) trptype(tcp) conname('localhost(2000)') xmitq(trq)
     3 : Define channel(sr) chltype(SDR) trptype(tcp) conname('localhost(2000)')xmitq(trq)
AMQ8014: WebSphere MQ channel created.

define qlocal(trq) usage(xmitq)
     4 : define qlocal(trq) usage(xmitq)
AMQ8006: WebSphere MQ queue created.

define Qremote(rq1) rqmname(QM2) rname(lq1) xmitq(trq)
     5 : define Qremote(rq1) rqmname(QM2) rname(lq1) xmitq(trq)
AMQ8006: WebSphere MQ queue created.

       :
end
     6 : end
5 MQSC commands read.
No commands have a syntax error.
All valid MQSC commands were processed.

-----------------------------------------------------------------------------------------------------
Now the 2nd QMgr is to be created

C:\Documents and Settings\miracle>crtmqm QM2
WebSphere MQ queue manager created.
Directory 'C:\Program Files\IBM\WebSphere MQ\qmgrs\QM2' created.
Creating or replacing default objects for QM2.
Default objects statistics : 68 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.

C:\Documents and Settings\miracle>strmqm QM2
WebSphere MQ queue manager 'QM2' starting.
5 log records accessed on queue manager 'QM2' during the log replay phase.
Log replay for queue manager 'QM2' complete.
Transaction manager state recovered for queue manager 'QM2'.
WebSphere MQ queue manager 'QM2' started.

C:\Documents and Settings\miracle>runmqsc QM2
5724-H72 (C) Copyright IBM Corp. 1994, 2009.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager QM2.


define Qlocal(lq1)
     1 : define Qlocal(lq1)
AMQ8006: WebSphere MQ queue created.

define Listener(ch1) trptype(tcp) port(2000)
     2 : define Listener(ch1) trptype(tcp) port(2000)
AMQ8626: WebSphere MQ listener created.

start listener(ch1)
     3 : start listener(ch1)
AMQ8021: Request to start WebSphere MQ Listener accepted.

Define Channel(sr) chltype(rcvr) trptype(tcp)
     4 : Define Channel(sr) chltype(rcvr) trptype(tcp)
AMQ8014: WebSphere MQ channel created.

end
     5 : end
4 MQSC commands read.
No commands have a syntax error.
All valid MQSC commands were processed.

C:\Documents and Settings\miracle>rummqsc QM1
'rummqsc' is not recognized as an internal or external command,
operable program or batch file.

C:\Documents and Settings\miracle>runmqsc QM1
5724-H72 (C) Copyright IBM Corp. 1994, 2009.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager QM1.


start channel(sr)
     1 : start channel(sr)
AMQ8018: Start WebSphere MQ channel accepted.

end
     2 : end
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.


C:\Documents and Settings\miracle>amqsput RQ1 QM1
Sample AMQSPUT0 start
target queue is RQ1
Miracle Software Systems
Sample AMQSPUT0 end

C:\Documents and Settings\miracle>amqsget LQ1 QM2
Sample AMQSGET0 start
Message <Miracle Software Systems>
no more messages
Sample AMQSGET0 end

No comments: