IBM OS/390 Time Clock User Manual


 
5.6.6.1 Cross-Region Sharing - Single CPU Environment
Whenever a VSAM data set (ACB) is opened by more than one control block
structure concurrently, data integrity must be considered. OS/390 VSAM offers
two levels of protection and/or sharing within a single CPU.
1. OS/390 will prevent concurrent update/update or update/read access to a
VSAM data set if DISP=OLD is coded on the JCL DD statement. If
DISP=OLD is specified, the shareoptions will be treated as (1 3). This can
potentially provide performance improvements for load jobs.
2. VSAM will monitor access via the data set shareoptions if DISP=SHR has
been specified on the DD statement.
The purpose of the VSAM shareoptions is to permit the user to specify the
required level of integrity of the data set and prevent possible loss of records,
updates, or even total loss of access to the data set. There are actually two
types of integrity that can be of concern and the shareoptions vary in the type of
integrity provided:
Write integrity - Assurance that, if an update or add is done, it will not be lost
and the data set will not be destroyed.
Read integrity - Assurance that the record read is current (that is, no other
user has since updated it).
Now let us review the shareoptions with respect to the integrity provided.
Integrity
Read Write
SHR(1 x) | YES | YES
SHR(2 x) | NO | YES
SHR(3 x) | NO | NO
SHR(4 x) | NO* | NO**
Figure 10. OS/390 VSAM Integrity Provided by Cross-Region Shareoptions
* VSE/VSAM will refresh buffers if a data set is open for output. VSE/VSAM also
automatically enqueues on CIs and CAs to ensure integrity in the event of
concurrent requests. OS/390 buffer refresh is done only for random (direct)
reads. OS/390 VSAM does not automatically enqueue on records as VSE/VSAM
does.
** VSE/VSAM SHR(4 x) guarantees the write integrity of a VSAM data set. OS/390
VSAM SHR(4 x) does not guarantee the write integrity of a VSAM data set.
With SHR(1 x) a user can not open a file for input to read if another user has
opened it for output, so both read and write integrity are assured.
With SHR(2 x) read integrity is not assured because a program (user) may be
accessing a data record from a buffer while another user is updating it on disk.
Write integrity is assured since there can only be one update at a time.
With SHR(3 x) VSAM does not prevent any users open and does not monitor
their access. Yes, you can destroy the file!
126 VSE to OS/390 Migration Workbook