

Data Manipulation Language Statements › @KEEP—places an explicit shared or exclusive lock on a record
@KEEP—places an explicit shared or exclusive lock on a record
The @KEEP statement places an explicit shared or exclusive lock on a record that is current of run unit, record, set, or area. Explicit record locks are used to maintain record locks that would otherwise be released following a change in currency:
- Explicit shared—Other run units can retrieve the locked record but cannot update it as long as the lock is in effect. Any number of concurrently executing run units can place a shared lock on a record; however, no run unit can place a shared lock on a record on which another run unit has placed an exclusive lock.
- Explicit exclusive—No other run unit can access the record as long as the lock is in effect. Only one run unit at a time can place an exclusive lock on a record; that run unit has exclusive control of the record. In order for a run unit to place an exclusive lock or a record, that record cannot hold either an exclusive or a shared lock assigned by any other run unit.
Locks placed on records by the @KEEP function are maintained for the duration of the recovery unit or until explicitly released by means of the @COMMIT verb.
Currency
Currency on run unit, record, set, or area must be established before execution of the @KEEP statement.
Currency is not updated after execution of the @KEEP statement.
Copyright © 2014 CA.
All rights reserved.
 
|
|