This chapter provides a detailed example of how to connect queue managers together to send messages from one to the other. The example gives you a step-by-step implementation of a unidirectional interconnection of two queue managers.
Figure 79 illustrates the interaction between all the system components used for transferring messages between queue managers.
Figure 79. Connecting two queue managers in WebSphere MQ for z/OS using CICS
In the following list, the numbered items refer to the boxed index numbers in the figure.
QUEUE | Payrollr |
TYPE | QREMOTE |
DESCR | PAYROLL QUEUE ON QM2 QUEUE MANAGER |
PUT | ENABLED |
DEFPRTY | 0 |
DEFPSIST | YES |
RNAME | QM1_payroll |
RQMNAME | QM2 |
From this information, the local queue manager QM1 determines that messages for this queue have to be transmitted to a remote queue manager QM2.
For QM1, QM2 is just a transmission queue on which messages have to be placed. A transmission queue is a local queue with its usage parameter set to XMITQ.
QUEUE | QM2 |
TYPE | LOCAL |
DESCR | QUEUE MANAGER QM2 TRANSMISSION QUEUE |
PUT | ENABLED |
DEFPRTY | 0 |
DEFPSIST | YES |
OPPROCS | 0 |
IPPROCS | 0 |
CURDEPTH | 0 |
MAXDEPTH | 100000 |
PROCESS | QM2.PROCESS |
TRIGGER |
|
MAXMSGL | 4194304 |
BOTHRESH | 0 |
BOQNAME |
|
STGCLASS | DEFAULT |
INITQ | Init_queue |
USAGE | XMITQ |
SHARE |
|
DEFSOPT | EXCL |
MSGDLVSQ | FIFO |
RETINTVL | 0 |
TRIGTYPE | FIRST |
TRIGDPTH | 1 |
TRIGMPRI | 0 |
TRIGGERDATA | 0 |
DEFTYPE | PREDEFINED |
NOHARDENBO |
|
GET | ENABLED |
Messages that the application puts to Payrollr are actually placed on the transmission queue QM2.
The transmission queue definition refers to an initiation queue called Init_queue, and the queue manager places a trigger message on this queue. The transmission queue definition also refers to the trigger process definition, and information from this definition is included in the trigger message.
The definition of the process in queue manager QM1 is:
PROCESS | QM2.PROCESS |
DESCR | PROCESS DEFINITION - TO TRIGGER CHANNEL QM1.2.QM2.CHANNEL |
APPLTYPE | CICS |
APPLICID | CKSG |
USERDATA | QM1.2.QM2.CHANNEL |
ENVRDATA | environment information |
The result of this trigger processing is that a trigger message is placed on the initiation queue, Init_queue.
Figure 80. Sender settings (1)
+--------------------------------------------------------------------------------+
| Channel Help |
| ------------------------------------------------------------------------------ |
| MCATTB1 QM1.2.QM2.CHANNEL - Settings CICSTQM2 |
| |
| |
| More: + |
| Channel type . . . . . . : SENDER |
| |
| Target system id . . . . : |
| Transmission queue name . : QM2 |
| Batch size . . . . . . . : 0100 |
| Sequence number wrap . . : 9999999 |
| Max message size . . . . : 0031000 |
| Max transmission . . . . : 32000 |
| Disconnect interval . . . : 0015 |
| Transaction id . . . . . : CKSG |
| Connection name . . . . . : QM2C |
| CICS profile name . . . . : |
| LU 6.2 TP name . . . . . : CKRC |
| |
| |
| |
| F1=Help F3=Exit F5=Refresh now F7=Bkwd F8=Fwd F10=Menu Bar |
| F12=Cancel |
+--------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------+
| Channel Help |
| ------------------------------------------------------------------------------ |
| MCATTB1 QM1.2.QM2.CHANNEL - Settings CICSTQM2 |
| |
| |
| More: + |
| Channel type . . . . . . : SENDER |
| |
| Target system id . . . . : |
| Transmission queue name . : QM2 |
| Batch size . . . . . . . : 0100 |
| Sequence number wrap . . : 9999999 |
| Max message size . . . . : 0031000 |
| Max transmission . . . . : 32000 |
| Disconnect interval . . . : 0015 |
| Transaction id . . . . . : CKSG |
| Connection name . . . . . : QM2C |
| CICS profile name . . . . : |
| LU 6.2 TP name . . . . . : CKRC |
| |
| |
| |
| F1=Help F3=Exit F5=Refresh now F7=Bkwd F8=Fwd F10=Menu Bar |
| F12=Cancel |
+--------------------------------------------------------------------------------+
Figure 81. Sender settings (2)
+--------------------------------------------------------------------------------+
| Channel Help |
| ------------------------------------------------------------------------------ |
| MCATTC1 QM1.2.QM2.CHANNEL - Settings CICSTQM2 |
| |
| |
| More: - |
| Channel type . . . . . . : SENDER |
| |
| Sequential delivery . . . : 0 (0=No or 1=Yes) |
| |
| Retry |
| Count . . . . . . . . . : 005 |
| Fast interval . . . . . : 005 |
| Slow interval . . . . . : 030 |
| |
| Exit routines |
| Security . . . . . . . : |
| Message . . . . . . . . : |
| Send . . . . . . . . . : |
| Receive . . . . . . . : |
| |
| |
| F1=Help F3=Exit F5=Refresh now F7=Bkwd F8=Fwd F10=Menu Bar |
| F12=Cancel |
+--------------------------------------------------------------------------------+
The channel definition shows that CKSG must allocate a session on the CICS QM2C connection and invoke the CKRC transaction at the destination CICS system.
Figure 82. Connection definition (1)
+--------------------------------------------------------------------------------+
| |
| OBJECT CHARACTERISTICS |
| CEDA View |
| Connection : QM2C |
| Group : QM2CCONN |
| DEscription : LU 6.2 PARALLEL CONNECTION TO CICSTQM1 |
| CONNECTION IDENTIFIERS |
| Netname : CICSTQM1 |
| INDsys : |
| REMOTE ATTRIBUTES |
| REMOTESystem : |
| REMOTEName : |
| CONNECTION PROPERTIES |
| ACcessmethod : Vtam Vtam | IRc | INdirect | Xm |
| Protocol : Appc Appc | Lu61 |
| SInglesess : No No | Yes |
| DAtastream : User User | 3270 | SCs | STrfield | Lms |
| RECordformat : U U | Vb |
| OPERATIONAL PROPERTIES |
| + AUtoconnect : Yes No | Yes | All |
| |
| |
| |
| |
| APPLID=CICSTQM2 |
| |
| PF 1 HELP 3 END 6 CRSR 7 SBH 8 SFH 9 MSG 10 SB 11 SF 12 CNCL |
+--------------------------------------------------------------------------------+
Figure 83. Connection definition (2)
+--------------------------------------------------------------------------------+
| |
| |
| |
| |
| OBJECT CHARACTERISTICS |
| CEDA VIew |
| + INService : Yes Yes | No |
| SECURITY |
| SEcurityname : |
| ATtachsec : Local Local | Identify | Verify | Persistent |
| | Mixidpe |
| BINDPassword : PASSWORD NOT SPECIFIED |
| BINDSecurity : No No | Yes |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| APPLID=CICSTQM2 |
| |
| PF 1 HELP 3 END 6 CRSR 7 SBH 8 SFH 9 MSG 10 SB 11 SF 12 CNCL |
+--------------------------------------------------------------------------------+
Figure 84. Connection definition (1)
+--------------------------------------------------------------------------------+
| |
| OBJECT CHARACTERISTICS |
| CEDA View |
| Connection : QM1C |
| Group : QM1CCONN |
| DEscription : LU 6.2 PARALLEL CONNECTION TO CICSTQM2 |
| CONNECTION IDENTIFIERS |
| Netname : CICSTQM2 |
| INDsys : |
| REMOTE ATTRIBUTES |
| REMOTESystem : |
| REMOTEName : |
| CONNECTION PROPERTIES |
| ACcessmethod : Vtam Vtam | IRc | INdirect | Xm |
| Protocol : Appc Appc | Lu61 |
| SInglesess : No No | Yes |
| DAtastream : User User | 3270 | SCs | STrfield | Lms |
| RECordformat : U U | Vb |
| OPERATIONAL PROPERTIES |
| + AUtoconnect : Yes No | Yes | All |
| |
| |
| |
| |
| APPLID=CICSTQM1 |
| |
| PF 1 HELP 3 END 6 CRSR 7 SBH 8 SFH 9 MSG 10 SB 11 SF 12 CNCL |
+--------------------------------------------------------------------------------+
Figure 85. Connection definition (2)
+--------------------------------------------------------------------------------+
| |
| |
| |
| |
| OBJECT CHARACTERISTICS |
| CEDA VIew |
| + INService : Yes Yes | No |
| SECURITY |
| SEcurityname : |
| ATtachsec : Local Local | Identify | Verify | Persistent |
| | Mixidpe |
| BINDPassword : PASSWORD NOT SPECIFIED |
| BINDSecurity : No No | Yes |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| APPLID=CICSTQM1 |
| |
| PF 1 HELP 3 END 6 CRSR 7 SBH 8 SFH 9 MSG 10 SB 11 SF 12 CNCL |
+--------------------------------------------------------------------------------+
Figure 86. Receiver channel settings (1)
+--------------------------------------------------------------------------------+
| Channel Help |
| ------------------------------------------------------------------------------ |
| MCATTB3 QM1.2.QM2.CHANNEL - Settings CICSTQM1 |
| |
| |
| More: + |
| Channel type . . . . . . : RECEIVER |
| |
| Target system id . . . . : |
| |
| Batch size . . . . . . . : 0100 |
| Sequence number wrap . . : 9999999 |
| Max message size . . . . : 0031000 |
| Max transmission . . . . : 32000 |
| |
| |
| |
| |
| |
| |
| |
| |
| F1=Help F3=Exit F5=Refresh now F7=Bkwd F8=Fwd F10=Menu Bar |
| F12=Cancel |
+--------------------------------------------------------------------------------+
Figure 87. Receiver channel settings (2)
+--------------------------------------------------------------------------------+
| Channel Help |
| ------------------------------------------------------------------------------ |
| MCATTC3 QM1.2.QM2.CHANNEL- Settings CICSTQM1 |
| |
| |
| More: - |
| Channel type . . . . . . : RECEIVER |
| |
| Sequential delivery . . . : 0 (0=No or 1=Yes) |
| Put authority . . . . . . : 1 (1=Process or 2=Context) |
| |
| |
| |
| |
| |
| Exit routines |
| Security . . . . . . . : |
| Message . . . . . . . . : |
| Send . . . . . . . . . : |
| Receive . . . . . . . . : |
| |
| |
| F1=Help F3=Exit F5=Refresh now F7=Bkwd F8=Fwd F10=Menu Bar |
| F12=Cancel |
+--------------------------------------------------------------------------------+
When the batch limit of 100 is reached, or when the transmission queue is empty, the sender and receiver channels issue a syncpoint to commit the changes through the queue managers.