LOCKING

LOCKING

Top  Previous  Next

 

The LOCKING keyword locks the file during a report, preventing updates.

 

 

Format

 

LOCKING

 

 

The LOCKING keyword causes the query processor to take a file lock on the file named in the query sentence. This prevents any other process from modifying the file during the report, ensuring that the report reflects a snap shot view of the data at the point when the query began.

 

Files accessed using the TRANS() function in I-type dictionary records or using the T conversion code will not be locked and hence may be modified during the report.

 

It is the user's responsibility to ensure that use of the lock in lengthy reports does not cause operational problems. In particular, be aware that a user who leaves a query on a "Press return to continue" prompt may severely affect the ability of other users to access the file.