UNLOCK Statement
Resets execution locks.
Syntax
UNLOCK {lock-val}
Syntax Elements
lock-val is the execution lock to be reset.
If lock-val is omitted, all execution locks previously set by the program are reset.
The DataBasic and Proc processors use the same 256 execution locks, numbered 0-255.
Comments
A warning message is displayed if you try to unlock an execution lock that the program did not lock and the lock is not unlocked.
All execution locks set by a program are automatically reset when the program terminates.
The TCL command CLEAR-BASIC-LOCKS can be used to reset all 256 execution locks. This command is present on the SYSMAN and SYSPROG accounts.
Examples
UNLOCK
Resets all execution locks previously set by the program.
UNLOCK 63
Resets execution lock 63.
UNLOCK (5+A)*(B-2)
Resets the execution lock specified by the value of the expression (5+A)*(B-2). A better way to accomplish this example is:
X=(5+A)*(B-2)
UNLOCK X