WITH LOCK Phrase
While the ACCEPT statement is retrieving information into identifier-1, the data area is locked with an LSRD (Lock Shared for Read) lock to prevent the data area from being changed. After identifier-1 is accepted, the WITH LOCK phrase places a LEAR (Lock Exclusive Allow Read) lock on the data area. If a lock cannot be placed on the data area, an exception condition occurs.
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.