LOCK

PURPOSE:
To obtain exclusive access to a file.
STATEMENT SYNTAX:
{stno} LOCK (unit {,ERR=stno})

EXAMPLE:
0230 LOCK(9,ERR=0240)
0500 LOCK(U+1)
NOTES: The LOCK command provides a means of preventing other users from accessing a specific file. The LOCK command prevents the OPENing of the file by any other user(the other user gets an error 0). Similarly, a file cannot be LOCKed if it is already in use by another user. In this case, an error 0 will occur on execution of the LOCK command.

The exclusive access to the file is released by the UNLOCK command or by closing the file.

See EXTRACT for locking only a single record.

LOCK is a no-op in FreeSM32 !!

Under LINUX your can not LOCK against yourself only other PID's!!