Chapter 32. Message channel planning example for z/OS using CICS

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


Connecting two queue managers in WebSphere MQ for z/OS using CICS. See the numbered list below for descriptions of the components in the figure, and their relationships and attributes.

In the following list, the numbered items refer to the boxed index numbers in the figure.

  1. The "Payroll reporter" application connects to queue manager "QM1", opens a queue called "Payrollr", and places messages on the queue.
  2. The attributes of Payrollr in queue manager QM1 are:
    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.

  3. The attributes of the transmission queue, QM2, in queue manager QM1 are:
    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.

  4. In this example, assume that the payroll message is the first message to be placed on the empty transmission queue, and because of the triggering attributes of the transmission queue, the queue manager determines that a trigger message is to be issued.

    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.

  5. If you experience trigger messages failing to appear when expected, refer to the WebSphere MQ Application Programming Guide.
  6. The CKTI transaction is a long-running task that monitors the initiation queue, Init_queue. CKTI processes the trigger message, an MQTM structure, to find that it must start CKSG. CKSG is the CICS name of the sender channel MCA transaction.
  7. CKTI starts CKSG, passing the MQTM structure. The CKSG transaction starts processing, receives the MQTM structure, and extracts the name of the channel.
  8. The channel name is used by CKSG to get the channel definition from the channel definition file on QM1. The DQM display settings panel of the channel in QM1.2.QM2.CHANNEL, is:

    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.

  9. The QM2C connection definition provides a communications link to the CICS system at the remote installation. The definition is as follows:

    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 |
    +--------------------------------------------------------------------------------+
  10. The connection definition on the remote installation CICS system is called QM1C, and is defined as follows:

    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 |
    +--------------------------------------------------------------------------------+
  11. CKRC is started by CICS on the remote system, and is passed the channel name during the initial data flows.
  12. The transaction CKRC reads the definition for the receiver channel QM1.2.QM2.CHANNEL from the channel definition file, which contains:

    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                                                                     |
    +--------------------------------------------------------------------------------+
  13. Once the message channel has completed the startup negotiation, the sender channel passes messages to the receiver channel. The receiver channel takes the name of the queue manager, queue name and message descriptor from the transmission header, and issues an MQPUT1 call to put the message on the local queue, QM1_payroll.

    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.

  14. The commit action by the QM2 queue manager makes the messages available to the "Payroll process" application.


© IBM Corporation 2002. All Rights Reserved