Lock Options

If the specified file is a tape file, it is rewound and the tape unit is made inaccessible to the system until the operator readies it again. If the file is a disk file, it is retained as a permanent file on disk. The file buffer areas are returned to the system.

A LOCK file statement with a lock option performs the same action as a CLOSE statement that specifies CRUNCH. Whether CRUNCH or an asterisk (*) appears as the lock option, the action of the LOCK file statement is the same. The file must be a disk file. The unused portion of the last row of disk space, beyond the end-of-file indicator, is returned to the system. The disk file can no longer be expanded without being copied into a new file; however, data can be written to existing records.