unlock statement

The unlock statement resets an execution lock, in the range 0 to 991, previously set with a lock statement.

Syntax

unlock
unlock lock.num.exp

Parameter(s)

lock.num.exp Specifies which execution lock (from 0 to 991) to reset. If not specified, all locks set by the program are unlocked.

Example(s)

This conditionally sets execution lock 12 just before a segment of code that performs file retrieval and update. When complete, lock 12 is cleared by the unlock statement.

again: lock 12 else rqm; goto again
read rec from file,ID else print ID:" not found"; rec = "X"
write rec on file,ID
unlock 12