The ways in which syncpoint requests and responses are exchanged on intersystem conversations are defined in the APPC and LUTYPE6.1 architectures. CICS MRO and IPIC use the APPC recovery protocols. Although the formats of syncpoint flows for APPC and LUTYPE6.1 are different, the concepts of syncpoint exchanges are similar.
In CICS, the flows involved in syncpoint exchanges are generated automatically in response to explicit or implicit SYNCPOINT commands issued by a transaction. However, a basic understanding of the flows that are involved can help you in the design of your application and give you an appreciation of the consequences of session or system failure during the syncpoint activity. For more information about these flows, see the CICS Distributed Transaction Programming Guide.
Figures Figure 1 through Figure 3 show some examples of syncpoint flows. In the figures, the numbers in brackets, for example, (1), show the sequence of the actions in each flow.
A CICS task may contain one or more UOWs. A local UOW that initiates syncpoint activity—by, for example, issuing an EXEC CICS SYNCPOINT or an EXEC CICS RETURN command—is called an initiator. A local UOW that receives syncpoint requests from an initiator is called an agent. The simplest case is shown in Figure 1. There is a single conversation between an initiator and an agent. At the start of the syncpoint activity, the initiator sends a commit request to the agent. The agent commits its changes and responds with committed. The initiator then commits its changes, and the unit of work is complete. However, the agent retains recovery information about the UOW until its partner tells it (by means of a “forget” flow) that the information can be discarded.
Figure 3 shows a more general case, in which the initiator UOW has more than one (directly-connected) agent. It must inform each of its agents that a syncpoint is being taken. It does this by sending a “prepare to commit” request to all of its agents except the last. The last agent is the agent that is not told to prepare to commit.
Each agent that receives a “prepare” request responds with a “commit” request. When all such “prepare” requests have been sent and all the “commit” responses received, the initiator sends a “commit” request to its last agent. When this responds with a “committed” indication, the initiator then sends “committed” requests to all the other agents.