You are responsible for ensuring read integrity when the data set
is opened for sharing with cross-region SHAREOPTIONS 2, 3, and 4.
When your program issues a GET request, VSAM obtains a copy of the
control interval containing the requested data record. Another program
sharing the data set can also obtain a copy of the same control interval,
and can update the data and write the control interval back into the
data set. When this occurs, your program has lost read integrity.
The control interval copy in your program's buffer is no longer the
current copy.
The following should be considered when you are providing read
integrity:
- Establish ENQ/DEQ procedures for all requests, read and write.
- Decide how to determine and invalidate buffers (index and/or data)
that are possibly down-level.
- Do not permit secondary allocation for an entry-sequenced data
set or for a fixed-length or variable-length RRDS. If you do allow
secondary allocation you should provide a communication mechanism
to the read-only tasks that the extents are increased, force a CLOSE,
then issue another OPEN. Providing a buffer refresh mechanism for
index I/O will accommodate secondary allocations for a key-sequenced
data set.
- With an entry-sequenced data set or a fixed-length or variable-length
RRDS, you must also use the VERIFY macro before the GET macro to update
possible down-level control blocks.
- Generally, the loss of read integrity results in down-level data
records and erroneous no-record-found conditions.