When a lock is first acquired, it is an active lock. It remains
an active lock until successful completion of the unit of work, until it is
released, or until it is converted into a retained lock if the unit of work
fails or for a CICS® or
SMSVSAM failure.
CICS supports active and retained states
for locks.
- If a unit of work fails, RLS VSAM or the CICS enqueue domain continues to hold the
record locks that were owned by the failed unit of work for recoverable data
sets, but converted into retained locks. Retaining locks ensures that data
integrity for those records is maintained until the unit of work is completed.
- If a CICS region
fails, locks are converted into retained locks to ensure that data integrity
is maintained while CICS is being restarted.
- If an SMSVSAM server fails, locks are converted into retained locks, with
the conversion being carried out by the other servers in the sysplex, or by
the first server to restart if all servers have failed. This means that a
unit of work (UOW) that held active RLS locks holds retained RLS locks following
the failure of an SMSVSAM server.
Converting active locks into retained locks not only protects data integrity.
It also ensures that new requests for locks owned by the failed unit of work
do not wait, but instead are rejected with the LOCKED response.