basic.filelock Statement/BASIC Program


Command basic.filelock Statement/BASIC Program
Applicable release versions: AP 6.2
Category BASIC Program (486)
Description sets an exclusive lock on an entire file.

Once a file lock has been set, any other port which attempts to update, item lock, or file lock that file will fail.

If file.variable is not specified, then the default file variable is assumed.

The filelock is useful preventing updates to a file while a sequential operation is running (like a BASIC select).

If the file is already locked (meaning another user has a file or an item lock, or is currently updating that file) and the optional locked clause is present, then statement.block is executed. If no locked clause is present, then the statement blocks until the situation is resolved.

File locks are displayed by the "list-locks" TCL command as special item locks with item id's of "*" and hash's of 0. If necessary, these locks can be cleared abnormally with the "unlock-file" command.
Syntax filelock {file.variable} { locked statement.block}
Related basic.statements