If your run unit executes through central version and readies an area in shared update, the DBMS acquires implicit records locks in order to control concurrent access to data. It may acquire record locks for other ready modes, depending on the mode and the setting of lock-related system generation parameters.
For a complete discussion of when record locks are acquired, see the CA IDMS Database Administration Guide.
Implicit Shared Locks
Shared locks are placed on record occurrences that are current of record type, set, area, and run unit and are held until a record occurrence is no longer current.
Implicit Exclusive Locks
Exclusive locks are placed on record occurrences that are updated by your application. As you issue DML verbs that update the database, the DBMS acquires these exclusive locks and holds them until you commit or rollback your changes. They prevent other database sessions that are not sharing your run unit's transaction from accessing the locked records. To increase concurrency and avoid deadlocks, you should commit your changes frequently.
How Long Implicit Locks are Held
The DBMS maintains implicit exclusive locks until the transaction ends, which typically occurs when the next COMMIT, FINISH, or ROLLBACK statement is executed. Implicit share locks are maintained until the record is no longer current of run unit, set, area, or record. COMMIT ALL, FINISH, and ROLLBACK statements nullify all currencies and therefore cause all implicit shared locks to be released. COMMIT (without the ALL option) has no affect on currencies nor implicit share locks.
The following table lists the exclusive record locks set implicitly by each DML verb.
DML Verb |
Records Locked |
---|---|
CONNECT/DISCONNECT |
|
ERASE |
|
FIND (as it applies to indexed records) |
|
FIND (as it applies to logically deleted records encountered while walking a set in any update usage mode) |
|
GET (as it applies to relocating variable-length records when fragments can be relocated while processing in any update usage mode) |
|
MODIFY |
|
STORE |
1 - Locks are set for next records only if the set has prior pointers. |
Copyright © 2013 CA.
All rights reserved.
|
|