2. 2 File control statements
LOCK
2.2.1
LOCK < FD d @v , > "file name"
Format
d . . . . . drive number
v . . . . . diskette volume number
This statement locks a specified file.
Function
When a file is locked, requests to modify it will be denied. For example, the
Description
command prohibits DELETE or RENAME operations or writing of data in the
case of random access fi les. It is good practice to loc k fi les of a permanent or
semi-permanent nature. The file mode symbols in the fi le directory display are
followed by an asterisk to indicate protected files.
(The write protect seal serves as a hardware lock for an entire diskette.)
2.2.2
UNLOCK
UNLOCK < FD d @v , > "file name"
Format
d .
v . . . . . diskette volume number
This statement unlocks a specified file.
Function
2.2.3
RENAME
RENAME < FD d @ v , > "file name 1 ","file name 2"
Format
d
.
v . . . . . diskette volume number
This statement renames a specified file.
Function
To rename a fi le, its current name and its new name must be specified in this
Description
order. If a renamed fi le is identical in name and mode to any file currently stored
on the same diskette, an error occurs.
The RE NAME statement is prohibited for any locked file.
:
1 through 4
:
. . . drive number
1 through 4
.
:
. . . drive number
1 through 4
.
21