40
LOCK (lock)
Perform the protection (lock) of the file.
Format:
LOCK "
[<device name> : ] <filename> "
Note: Only FDn device name.
Abbreviated form:
LOC.
Explanation:
• If the file is locked, this file is fixed on the floppy disk and it will not accept any
change commands. For instance, DELETE and RENAME commands and data
write-in are prohibited. Put a lock on any file which you don't want to destroy or
change.
• The"
* "
mark is displayed before the file specs in the directory display on locked
files.
For example:
LOCK
"SAMPLE"
If the command above is executed, the file is. locked and the directory display is as
follows:
*
"SAMPLE"
L
sign to indicate file locking.
• Locking can be cancelled by the UNLOCK statement.
Example:
LOCK
"FD1:SAMPLE"
..... Locks the file named SAMPLE on file set in drive number 1.