Previous Topic: Locking Within Central VersionNext Topic: Types of Locks


Logical Locks

Control Access to Resources

Logical locks are used within a central version and within a data sharing group to control access to database resources by concurrently executing transactions. Before a transaction can access a resource, it places a lock on the resource which prevents other transactions from modifying or, in some cases, accessing the resource while the lock is maintained.

In a data sharing environment, CA IDMS uses global transaction locks, maintained in a coupling facility lock structure to control inter-member access to shared resources.

Note: For more information about global locking, see 39.5, “Locking Within a Data Sharing Group”.

Wait States

If a transaction attempts to lock a resource which is locked by another transaction with a conflicting mode, the first transaction will wait until the lock is released. If the waiting transaction exceeds the internal wait interval specified at system generation, CA IDMS aborts the transaction and rolls out its updates. If one transaction is waiting to place a lock and the transaction that holds it then waits on a lock held by the first transaction, a deadlock condition exists. CA IDMS resolves this condition by aborting and rolling back one of the transactions.

Note: For more information about detecting and resolving deadlocks, see 39.7, "Deadlocks".

Hierarchical Locking

CA IDMS/DB uses a hierarchical locking scheme in which locks are placed at area and record occurrence (row) levels. Area locks control access to the area, and by implication, all record occurrences stored within the area. Record locks control access to individual record occurrences or rows.

A transaction intending to access data within an area must first place a lock at the area level. Depending on the strength of that lock (its mode), the transaction may or may not also place locks on individual record occurrences as it retrieves or updates them.

In a data sharing environment, CA IDMS uses a three-level hierarchy to control inter-member access to shared resources: area, proxy, and record occurrence.

Note: For more information about this additional level, see 39.5.3, “Proxy Locks”.