The end of a UOW is indicated to CICS® by a synchronization point, usually
abbreviated to syncpoint.
A syncpoint arises in the following ways:
Implicitly at the end of a transaction as a result of an EXEC
CICS RETURN command at the highest logical level. This means that
a UOW cannot span tasks.
Explicitly by EXEC CICS SYNCPOINT commands issued by
an application program at appropriate points in the transaction.
Implicitly through a DL/I program specification block (PSB) termination
(TERM) call or command. This means that only one DL/I PSB can be scheduled
within a UOW.
Note that an explicit EXEC CICS SYNCPOINT command,
or an implicit syncpoint at the end of a task, implies a DL/I PSB termination
call.
Implicitly through one of the following CICS commands:
EXEC CICS CREATE TERMINAL
EXEC CICS CREATE CONNECTION COMPLETE
EXEC CICS DISCARD CONNECTION
EXEC CICS DISCARD TERMINAL
Implicitly by a program called by a distributed program link (DPL) command
if the SYNCONRETURN option is specified. When the DPL program terminates with
an EXEC CICS RETURN command, the CICS mirror transaction takes a syncpoint.
It follows from this that a unit of work starts:
At the beginning of a transaction
Whenever an explicit syncpoint is issued and the transaction does not
end
Whenever a DL/I PSB termination call causes an implicit syncpoint and
the transaction does not end
Whenever one of the following CICS commands causes an implicit syncpoint
and the transaction does not end:
EXEC CICS CREATE TERMINAL
EXEC CICS CREATE CONNECTION COMPLETE
EXEC CICS DISCARD CONNECTION
EXEC CICS DISCARD TERMINAL
A UOW that does not change a recoverable resource has no meaningful effect
for the CICS recovery
mechanisms. Nonrecoverable resources are never backed out.
A unit of work can also be ended by backout, which causes a syncpoint in
one of the following ways:
Implicitly when a transaction terminates abnormally, and CICS performs
dynamic transaction backout
Explicitly by EXEC CICS SYNCPOINT ROLLBACK commands
issued by an application program to backout changes made by the UOW.
Examples of synchronization points
In Figure 1, task A is a nonconversational (or
pseudoconversational) task with one UOW, and task B is a multiple UOW task (typically a
conversational task in which each UOW accepts new data from the user). The figure shows how UOWs end
at syncpoints. During the task, the application program can issue syncpoints explicitly, and, at the
end, CICS issues a
syncpoint. Figure 1. Units of work and syncpoints
Figure 2 shows that database changes made by a task are not
committed until a syncpoint is executed. If task processing is interrupted because of a failure of
any kind, changes made within the abending UOW are automatically backed out.
If there is a system failure at time X:
The change(s) made in task A have been committed and are therefore not backed out.
In task B, the changes shown as Mod 1 and Mod 2 have been committed, but the change shown as Mod
3 is not committed and is backed out.