Read without integrity
Database-level sharing of IMS databases provides for sharing of databases between a single update-capable batch or online IMS system and any number of other IMS systems that are reading data that are without integrity.
A GE status code might be returned to a program using PROCOPT=GOx for a segment that exists in a HIDAM database during control interval (CI) splits.
In IMS, programs that use database-level sharing include PROCOPT=GOx in their
DBPCBs for that data. For batch jobs, the DBPCB PROCOPTs establish the batch job's access level for
the database. That is, a batch job uses the highest declared intent for a database as the access
level for DBRC database authorization. In an online IMS
environment, database ACCESS is specified on the DATABASE macro during IMS system definition, and it can be changed using the /START DB
ACCESS=RO
command. Online IMS systems schedule
programs with data availability determined by the PROCOPTs within those program PSBs being
scheduled. That data availability is therefore limited by the online system's database
access.
The PROCOPT=GON and GOT options provide certain limited PCB status code retry for some recognizable pointer errors, within the data that is being read without integrity. In some cases, dependent segment updates, occurring asynchronously to the read-without-integrity IMS instance, do not interfere with the program that is reading that data without integrity. However, update activity to an average database does not always allow a read-without-integrity IMS system to recognize a data problem.
What read without integrity means
Each IMS batch or online instance has OSAM and VSAM buffer pools defined for it. Without locking to serialize concurrent updates that are occurring in another IMS instance, a read without integrity from a database data set fetches a copy of a block or CI into the buffer pool in storage. Blocks or CIs in the buffer pool can remain there a long time. Subsequent read without integrity of other blocks or CIs can then fetch more recent data. Data hierarchies and other data relationships between these different blocks or CIs can be inconsistent.
For example, consider an index database (VSAM KSDS), which has an index component and a data component. The index component contains only hierarchic control information, relating to the data component CI where a given keyed record is located. Think of this as the way that the index component CI maintains the high key in each data component CI. Inserting a keyed record into a KSDS data component CI that is already full causes a CI split. That is, some portion of the records in the existing CI are moved to a new CI, and the index component is adjusted to point to the new CI.
For example, suppose the index CI shows the high key in the first data CI as KEY100, and a split occurs. The split moves keys KEY051 through KEY100 to a new CI; the index CI now shows the high key in the first data CI as KEY050, and another entry shows the high key in the new CI as KEY100.
A program that is reading is without integrity, which already read the old
index component CI into its buffer pool (high key KEY100), does not point to the newly created data
CI and does not attempt to access it. More specifically, keyed records that exist in a KSDS at the
time a read-without-integrity program starts might never be seen. In this example, KEY051 through
KEY100 are no longer in the first data CI even though the old
copy of the index CI in the
buffer pool still indicates that any existing keys up to KEY100 are in the first data
CI.
Hypothetical cases also exist where the deletion of a dependent segment and the insertion of that same segment type under a different root, placed in the same physical location as the deleted segment, can cause simple Get Next processing to give the appearance of only one root in the database. For example, accessing the segments under the first root in the database down to a level-06 segment (which had been deleted from the first root and is now logically under the last root) would then reflect data from the other root. The next and subsequent Get Next calls retrieve segments from the other root.
Read-only (PROCOPT=GO) processing does not provide data integrity.
Data set extensions
IMS instances with database-level sharing can open a database for read without integrity.
After the database is opened, another program that is updating that database can make changes to the data. These changes might result in logical and physical extensions to the database data set. Because the read-without-integrity program is not aware of these extensions, problems with the RBA (beyond end-of-data) can occur.