illustration" /> Running CICS DPL programs

 

Running CICS DPL programs

Data necessary to run the program is provided in the WebSphere MQ message. The bridge builds a COMMAREA from this data, and runs the program using EXEC CICS LINK. Figure 16 shows the sequence of actions taken to process a single message to run a CICS DPL program:

Figure 16. Components and data flow to run a CICS DPL program

The following takes each step in turn, and explains what takes place:

  1. A message, with a request to run a CICS program, is put on the request queue.

  2. The CICS bridge monitor task, which is constantly browsing the queue, recognizes that a 'start unit of work' message is waiting (CorrelId=MQCI_NEW_SESSION).

  3. Relevant authentication checks are made, and a CICS DPL bridge task is started with the appropriate authority, with a particular userid (depending on the options used to start the bridge monitor).

  4. The CICS DPL bridge task removes the message from the request queue.

  5. The CICS DPL bridge task builds a COMMAREA from the data in the message and issues an EXEC CICS LINK for the program requested in the message.

  6. The program returns the response in the COMMAREA used by the request.

  7. The CICS DPL bridge task reads the COMMAREA, creates a message, and puts it on the reply-to queue specified in the request message. All response messages (normal and error, requests and replies) are put to the reply-to queue with default context.

  8. The CICS DPL bridge task ends. If this is the last flow in the transaction then the transaction ends, if it is not the last message, the transaction waits until the next message is received or the specified timeout interval expires.

A unit of work can be just a single user program, or it can be multiple user programs. There is no limit to the number of messages we can send to make up a unit of work.

In this scenario, a unit of work made up of many messages works in the same way, with the exception that the CICS bridge task waits for the next request message in the final step unless it is the last message in the unit of work.