UNLOCK Statement COBOL

The UNLOCK statement releases all record locks held by the run unit for a shared input-output file.

UNLOCK Statement

The file to which file-name-1 refers must be in an open mode at the time the UNLOCK statement is executed.

In all record locking modes any record locks held by the run unit for file-name-1 are released upon execution of the UNLOCK statement.

If no record in the file is locked, execution of the UNLOCK statement is successful and no action is taken except for updating the file status data item.

The file position indicator is not affected by the execution of the UNLOCK statement.

The file status data item associated with the file, if one exists, is updated. The UNLOCK statement may not be used to unlock records locked by other run units. See “Record Locking” for additional information on record locking and unlocking.

UNLOCK Statement Examples


Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

COBOL Topics