Using the mirror transaction

The intercommunication component uses CICS terminal-control facilities to send the request to the mirror transaction. The request to a specific server region causes the communication component in the client region to precede the formatted request with the identifier of the appropriate mirror transaction to be attached in the server system.

If you use a user-specified name for the mirror transaction initiated by any given DPL request, the following actions become easier:
  • Controlling access to resources
  • Accounting for system usage
  • Performance tuning
  • Establishing an audit trail
This transaction name must be defined in the server region as a transaction that invokes the mirror program DFHMIRS. If you define user transactions to invoke the mirror program, you can then specify appropriate values for all the other options on the transaction resource definition. To initiate any user-defined mirror transaction, the client program specifies the transaction name on the LINK request. Alternatively, the transaction name can be specified on the TRANSID option of the program resource definition.
Figure 1. The transformer program and the mirror in DPL
The figure shows two CICS regions, CICA and CICB. On CICA, a program PGA is defined as remote, owned by region CICB. On CICB, PGA is defined as a local program. On CICA, a program issues an EXEC CICS LINK PROGRAM('PGA') request. Also shown on CICA are the EXEC interface program, DFHEIP, programs DFHEPC and DFHISP, and the transformer program, DFHXFP. Shown on CICB are the mirror transaction, program PGA, and the transformer program, DFHXFP. The picture shows the data flows described in the text.

As line (4) in Figure 1 shows, a mirror transaction uses the transformer program DFHXFP to decode the formatted link request. The mirror then executes the corresponding command, thereby linking to the server program PGA (5). When the server program issues the RETURN command (6), the mirror transaction uses the transformer program to construct a formatted reply (7). The mirror transaction returns this formatted reply to the client region (8). In that region (CICA in the example), the reply is decoded, again using the transformer program (9), and used to complete the original request made by the client program (10).

The mirror transaction, which is always long-running for DPL, suspends after sending its communications area. The mirror transaction does not terminate until the client program issues a syncpoint request or terminates successfully.

When the client program issues a syncpoint request, or terminates successfully, the intercommunication component sends a message to the mirror transaction that causes it also to issue a syncpoint request and terminate. The successful syncpoint by the mirror transaction is indicated in a response sent back to the client region, which then completes its syncpoint processing, so committing changes to any protected resources.

The client program can link to server programs in any order, without being affected by the location of server programs (they could all be in different server regions, for example). When the client program links to server programs in more than one server region, the intercommunication component invokes a mirror transaction in each server region to execute link requests for the client program. Each mirror transaction follows the rules just described for termination, and when the application program reaches a syncpoint, the intercommunication component exchanges syncpoint messages with any mirror transactions that have not yet terminated.