The mirror transaction and transformer program
CICS® supplies a number of mirror transactions, some of which correspond to "architected processes".
Details of the supplied mirror transactions are given in Defining local resources. Here, they are referred to generally as the mirror transaction and have the transaction identifier CSM*.
The mirror transaction runs as a normal CICS transaction and is threadsafe when an IPIC connection is used.
Figure 1. The transformer program and the mirror
in function shipping

The sequence of events in Figure 1 are as follows:
- In the requesting system (CICA in Figure 1), the command-level EXEC interface program (for all except DL/I requests) determines that the requested resource is on another system (CICB in the example). It therefore calls the function-shipping transformer program to transform the request into a form suitable for transmission (in the example, line 2 indicates this call). The EXEC interface program then calls on the intercommunication component to send the transformed request to the appropriate connected system (line 3). For DL/I requests, part of this function is handled by CICS DL/I interface modules. For guidance about DL/I request processing, see Overview of Database Control (DBCTL).
- The first request to a specific remote system on behalf of a transaction causes the communication component in the local system to precede the formatted request with the appropriate mirror transaction identifier, in order to attach this transaction in the remote system. Thereafter, it keeps track of whether the mirror transaction stops, and reinvokes it as required.
- The mirror transaction uses the function-shipping transformer program to decode the formatted request (line 4 in Figure 1). The mirror then runs the corresponding command. On completion of the command, the mirror transaction uses the transformer program to construct a formatted reply (line 5). The mirror transaction returns this formatted reply to the requesting system, CICA (line 6). On CICA, the reply is decoded, again using the transformer program (line 7), and used to complete the original request made by the application program (line 8).
- If the mirror transaction is not required to update any protected resources, and no previous request updated a protected resource in its system, the mirror transaction stops after sending its reply. However, if the request causes the mirror transaction to change or update a protected resource, or if the request is for any DL/I program specification block (PSB), it does not stop until the requesting application program issues a synchronization point (sync point) request or ends successfully. If a browse is in progress, the mirror transaction does not end until the browse is complete.
- When the application program issues a sync point request, or ends successfully, the intercommunication component sends a message to the mirror transaction that causes it also to issue a sync point request and stop. The successful sync point by the mirror transaction is indicated in a response sent back to the requesting system, which then completes its sync point processing, thereby committing changes to any protected resources. If DL/I requests have been received from another system, CICS issues a DL/I TERM request as a part of the processing resulting from a sync point request made by the application program and carried out by the mirror transaction.
- The application program can access protected or unprotected resources in any order, and is not affected by the location of protected resources. They might all be in remote systems, for example. When the application program accesses resources in more than one remote system, the intercommunication component invokes a mirror transaction in each system to run requests for the application program. Each mirror transaction follows the rules described previously for ending, and when the application program reaches a sync point, the intercommunication component exchanges sync point messages with any mirror transactions that have not yet ended. This situation is called the multiple-mirror.
- The mirror transaction uses the CICS command-level interface to run CICS requests, and the DL/I CALL or the EXEC DLI interface to run DL/I requests. The request is thus processed as for any other transaction and the requested resource is located in the appropriate resource table. If its entry defines the resource as remote, the mirror transaction's request is formatted for transmission and sent to another mirror transaction in the specified system. This situation is called a chained-mirror. To guard against possible threats to data integrity caused by session failures, you are recommended to avoid defining a connected system in which chained mirror requests occur, except when the requests involved do not access protected resources, or are inquiry-only requests.