The following example illustrates how to set up two WebSphere MQ for iSeries systems, using CL commands, so that they can communicate with one another.
The systems are called SYSTEMA and SYSTEMB, and the communications protocol used is TCP/IP.
Carry out the following procedure:
CRTMQM MQMNAME(QMGRA1) TEXT('System A - Queue + Manager 1') UDLMSGQ(SYSTEM.DEAD.LETTER.QUEUE)
STRMQM MQMNAME(QMGRA1)
/* Transmission queue */ CRTMQMQ QNAME(XMITQ.TO.QMGRB1) QTYPE(*LCL) + MQMNAME(QMGRA1) TEXT('Transmission Queue + to QMGRB1') MAXDEPTH(5000) USAGE(*TMQ) /* Remote queue that points to a queue called TARGETB */ /* TARGETB belongs to queue manager QMGRB1 on SYSTEMB */ CRTMQMQ QNAME(TARGETB.ON.QMGRB1) QTYPE(*RMT) + MQMNAME(QMGRA1) TEXT('Remote Q pointing + at Q TARGETB on QMGRB1 on Remote System + SYSTEMB') RMTQNAME(TARGETB) + RMTMQMNAME(QMGRB1) TMQNAME(XMITQ.TO.QMGRB1) /* TCP/IP sender channel to send messages to the queue manager on SYSTEMB*/ CRTMQMCHL CHLNAME(QMGRA1.TO.QMGRB1) CHLTYPE(*SDR) + MQMNAME(QMGRA1) TRPTYPE(*TCP) + TEXT('Sender Channel From QMGRA1 on + SYSTEMA to QMGRB1 on SYSTEMB') + CONNAME(SYSTEMB) TMQNAME(XMITQ.TO.QMGRB1)
CRTMQM MQMNAME(QMGRB1) TEXT('System B - Queue + Manager 1') UDLMSGQ(SYSTEM.DEAD.LETTER.QUEUE)
STRMQM MQMNAME(QMGRB1)
/* Local queue to receive messages on */ CRTMQMQ QNAME(TARGETB) QTYPE(*LCL) MQMNAME(QMGRB1) + TEXT('Sample Local Queue for QMGRB1') /* Receiver channel of the same name as the sender channel on SYSTEMA */ CRTMQMCHL CHLNAME(QMGRA1.TO.QMGRB1) CHLTYPE(*RCVR) + MQMNAME(QMGRB1) TRPTYPE(*TCP) + TEXT('Receiver Channel from QMGRA1 to + QMGRB1')
STRMQMLSR MQMNAME(QMGRB1)
You are now ready to send test messages between SYSTEMA and SYSTEMB. Using one of the supplied samples, put a series of messages to your remote queue on SYSTEMA.
Start the channel on SYSTEMA, either by using the command STRMQMCHL, or by using the command WRKMQMCHL and entering a start request (Option 14) against the sender channel.
The channel should go to RUNNING status and the messages are sent to queue TARGETB on SYSTEMB.
Check your messages by issuing the command:
WRKMQMMSG QNAME(TARGETB) MQMNAME(QMGRB1).
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
amqwag0237 |