11.01.2013 Views

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7.27 Unit <strong>of</strong> work and unit <strong>of</strong> recovery<br />

Start <strong>of</strong> program synchronized implicit<br />

update 1<br />

update 2<br />

commit synchronized explicit<br />

update 3<br />

update 4<br />

update 5 }<br />

B<br />

commit synchronized explicit<br />

update 6 } C<br />

End <strong>of</strong> program synchronized implicit<br />

Figure 7-36 Unit <strong>of</strong> recovery example<br />

Unit <strong>of</strong> work and unit <strong>of</strong> recovery<br />

A unit <strong>of</strong> work (UOW) is the term used in CICS publications for a set <strong>of</strong> updates that are<br />

treated as an atomic set <strong>of</strong> changes.<br />

RRS uses unit <strong>of</strong> recovery (UR) to mean much the same thing. Thus, a unit <strong>of</strong> recovery is the<br />

set <strong>of</strong> updates between synchronization points. There are implicit synchronization points at<br />

the start and at the end <strong>of</strong> a transaction. Explicit synchronization points are requested by an<br />

application within a transaction or batch job. It is preferable to use explicit synchronization for<br />

greater control <strong>of</strong> the number <strong>of</strong> updates in a unit <strong>of</strong> recovery.<br />

Changes to data are durable after a synchronization point. That means that the changes<br />

survive any subsequent failure.<br />

In Figure 7-36 there are three units <strong>of</strong> recovery, noted as A, B and C. The synchronization<br />

points between the units <strong>of</strong> recovery are either:<br />

► Implicit - At the start and end <strong>of</strong> the program<br />

► Explicit - When requested by commit<br />

426 <strong>ABCs</strong> <strong>of</strong> z/<strong>OS</strong> <strong>System</strong> <strong>Programming</strong> <strong>Volume</strong> 3<br />

} A<br />

= unit <strong>of</strong> recovery

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!