LOCK
FUNCTION
This command restricts the use of a file, allowing access only by the task that issued the LOCK command.
SYNTAX
LOCK link-name [BUSY PROCESS IS procedure] [ERROR PROCESS IS procedure]link-name the name of the link to be locked.
procedure the name of a procedure to perform.
NOTES
- This command may only be applied to a link that has already been opened by the task and is not currently opened by another task.
- The BUSY procedure is performed if a link is opened by another task.
- The ERROR procedure is performed if an error is encountered while executing the command.
- A locked link is released by the CLOSE or UNLOCK command, or by script termination.
EXAMPLES
LOCK 4SCUSFL BUSY PROCESS IS TRY-AGAIN ERROR PROCESS IS BAD-TRYSEE ALSO
CLOSE, LN, OPEN, TERMINATE, UNLOCK
From the Script-IV Language Reference, version 8.9.1. Open this page in the PDF