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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7.30 Application considerations<br />

Break processing into a series <strong>of</strong> transactions<br />

Figure 7-39 Application considerations<br />

Application considerations<br />

For an application to participate in transactional recovery, it must first understand the concept<br />

<strong>of</strong> a transaction. It is not a good idea simply to modify an existing batch job to use DFSMStvs<br />

with no further change, as this causes the entire job to be seen as a single transaction. As a<br />

result, locks would be held and log records would need to exist for the entire life <strong>of</strong> the job.<br />

This can cause a tremendous amount <strong>of</strong> contention for the locked resources. It can also<br />

cause performance degradation as the undo log becomes exceedingly large.<br />

Break processing into a series <strong>of</strong> transactions<br />

To exploit the DFSMStvs capabilities, break down application processing into a series <strong>of</strong><br />

transactions. Have the application issue frequent sync points by invoking RRS commit and<br />

backout processing (MVS callable services SRRCMIT and SRRBACK). For information about<br />

RRS, see 7.25, “DFSMStvs use <strong>of</strong> z/<strong>OS</strong> RRMS” on page 423.<br />

RLS and DFSMStvs provide isolation until commit/backout. Consider the following rules:<br />

► Share locks on records accessed with repeatable read.<br />

► Hold write locks on changed records until the end <strong>of</strong> a transaction.<br />

► Use commit to apply all changes and release all locks.<br />

► Information extracted from shared files must not be used across commit/backout for the<br />

following reasons:<br />

– Need to re-access the records<br />

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

Invoke RRS for commit and back out<br />

Modify program/JCL to request transactional VSAM<br />

access<br />

Specify through JCL or ACB<br />

Prevent multiple RPLs from causing intra-UR lock<br />

contention<br />

Handle potential loss <strong>of</strong> positioning at sync point<br />

Handle all work that is part <strong>of</strong> one UR under the<br />

same context<br />

Do not use file backup/restore as job restart<br />

technique

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

Saved successfully!

Ooh no, something went wrong!