How function shipping works

Two CICS® components implement function shipping:

Figure 3 illustrates how these components work together.

The transformer programs

If a CICS transaction issues a request to access a resource, the command level EXEC interface program determines whether the resource is owned by the local CICS system. If the resource is on another system, control passes to the function-shipping transformer program.

DL/I (EXEC DL/I or CALL DLI) requests use the DL/I interface, which also provides part of the transformer program’s function.

A transformer program converts the request to a form suitable for transmission, and calls the intercommunication component to send the request to the resource-owning system.

The CICS intercommunication component sends the request to the remote system. On the first request to a particular remote system on behalf of a transaction, the communication component in the local system precedes the formatted request with the mirror-transaction identifier, in order to attach this transaction in the remote system. The local transformer program keeps track of whether the remote mirror transaction terminates, and reinvokes it as required.

When a reply is received from the remote system, a second transformer program decodes it. CICS uses the decoded reply to complete the original command-level request.

The remote system uses its own transformer programs in dealing with the request (see next section).

Figure 3. Relationship of mirror and transformers
 The picture shows the scenario described in the text. It shows two CICS regions, CICA and CICB. On CICA are shown an application program, two transformer programs (Transformer 1 and Transformer 4) and the CICS Intercommunication component. On CICB are shown the mirror transaction and two transformer programs (Transformer 2 and Transformer 3). On CICA, the application issues a function shipping request. The request is passed to Transformer 1, which converts it into a form suitable for transmission and passes it to the Intercommunication component. The Intercommunication component sends the request to CICB. On CICB, the mirror transaction invokes Transformer 2, which decodes the request and pases it back to the mirror. The mirror executes the decoded request and passes the response to Transformer 3. Transformer 3 converts the response into a form suitable for transmission and passes it back to the mirror, which sends the response to CICA. On CICA, the Intercommunication component receives the response from CICB and passes it to Transformer 4 for decoding. Transformer 4 returns the decoded response to the application program.

The mirror transaction

A resource-owning system passes an incoming function-shipping request to the mirror transaction. The first request from a particular remote transaction causes the initiation of a new instance of the mirror transaction, which uses CICS intercommunication facilities to communicate with the requesting system.

Using a CICS transformer program, the mirror transaction decodes the formatted request, and executes the command. On completion of the command the mirror transaction uses a transformer program to construct a formatted reply, and returns this to the requesting system.

The mirror transaction remains active after sending its reply to the current command in any of the following cases:

In other cases, the mirror terminates after replying to the current command.

An active mirror always terminates when the requesting transaction issues a synchronization request or terminates successfully. The mirror always terminates after executing a LINK command with the SYNCONRETURN option. For a further explanation of SYNCONRETURN, please refer to Synchronization.

Multiple mirrors

A transaction can access recoverable and nonrecoverable resources in any order, and is not affected by the location of recoverable resources (they could all be in different remote systems, for example). When a local transaction accesses resources in more than one remote system, the intercommunication component invokes a mirror transaction in each remote system to execute requests for the local transaction. Each mirror transaction follows the above rules for termination, and when the transaction reaches a synchronization point, the intercommunication component exchanges synchronization point messages with those mirror transactions that have not yet terminated (if any).

Chained mirrors

The mirror transaction uses the EXEC CICS interface to execute CICS requests and the DL/I CALL or the EXEC DLI interface to execute 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 being remote, the mirror transaction’s request is formatted for transmission and sent to the specified remote system, which activates its own mirror transaction. This is called a chained-mirror.

Related concepts
Introduction to function shipping
Transparency to application
Remote resources that can be accessed
Synchronization
Function shipping examples
Related reference
CICS product communication support
[[ Contents Previous Page | Next Page Index ]]