FILEUNLOCK
Synopsis
FILEUNLOCK [filevar] [ON ERROR statements]
Arguments
filevar | Optional — A file variable name used to refer to a MultiValue file. This filevar is supplied by the OPEN statement. If not specified, the default file is unlocked. |
Description
The FILEUNLOCK statement is used to unlock a MultiValue file, undoing the lock established by FILELOCK. FILEUNLOCK only releases locks established by FILELOCK. It does not release record locks; record locks can be released using the RELEASE statement. You can check the status of file locks and record locks using the RECORDLOCKED function.
You can unlock a MultiValue file by issuing a FILEUNLOCK, by issuing a RELEASE with no record ID, or by closing the file.
FILEUNLOCK takes the file identifier filevar, defined by the OPEN statement.
You can optionally specify an ON ERROR clause. If file unlock fails, the ON ERROR clause is executed. This may occur if filevar does not refer to a currently open file.