A run unit that has specified single record locking for a file (either explicitly or implicitly) can hold only one record lock in that file at any one time. A run unit can acquire a record lock in two ways: manually or automatically:
The run unit acquires a lock only if it accesses a record with a READ WITH LOCK statement.
The run unit acquires a lock whenever it reads a record in the file, unless you specify the READ WITH NO LOCK statement.
The lock is released by the same run unit doing any of the following: