Previous Topic: Record LocksNext Topic: Area Usage Modes


Area Locks

Area in-use locks, also referred to as physical area locks, are examined whenever an area is opened in an update usage mode. These locks prevent run units originating in multiple regions or partitions (multiple local mode run units, multiple central versions, or a combination of both) from concurrently updating an area. Area in-use locks also prevent any access to an area that requires recovery of incomplete run units due to a local mode or central version abend.

Local Mode

In local mode the area lock is checked as each area is readied in an update usage mode. If the lock is already set, a value of 0966 is returned to the ERROR-STATUS field in the IDMS communications block and access to the area is disallowed. If the lock is not set, the local mode run unit causes the lock to be set. If the run unit terminates abnormally (that is, without issuing a FINISH statement), the lock remains set. Further update access by subsequent local mode or central version run units is prevented until the area is recovered manually (by restoring files or using a CA-supplied recovery utility).

Central Version

Each area accessible by a central version has an associated access mode. Access modes determine the availability of each area to run units running under the central version, to other central versions, and to programs running in local mode. The access modes are described below:

Note: The UPDATE, RETRIEVAL, and OFFLINE central version access modes are operator concerns; they are presented here as background information only. You do not specify these modes in your program.

System Startup

When the central version starts up, it checks the in use locks in all areas available for update. If any lock is found to be set, a warning message is displayed at the operator's console and further access to that area is disallowed. The central version proceeds without the use of that area; any run unit attempting to ready that area receives a value of 0966 returned to the ERROR-STATUS field in the IDMS communications block. If the lock is removed after startup, the DBA must change the area status from OFFLINE to ONLINE or RETRIEVAL to make the area available to the central version.

Note: In-use area locks are not set for individual run units running under the central version; run unit conflicts are avoided by internal means.