WITH LOCK Phrase

Before data is transferred to the specified data area in the FOR phrase, a lock must be obtained. If a lock cannot be obtained, the data is not transferred, and an ON EXCEPTION condition exists.

To maintain a lock on the data area after the transfer of data, specify this phrase. If a lock existed on the data area prior to this statement and the statement did not contain a WITH LOCK phrase, the lock is released.