RELEASE [filevar [,recID]] [ON ERROR statements]
|filevar||Optional — A file variable name used to refer to a MultiValue file. This filevar is supplied by the OPEN statement.|
|recID||Optional — The record ID for which record locks are to be released. If not specified, all record locks and the file lock on filevar are released.|
A RELEASE statement with no argument releases all record locks held by the current process that were applied at the current @LEVEL execution level. (This differs from native UniData behavior, which releases all locks held by the current process on all levels.)
A RELEASE statement with the filevar argument releases all record locks on the specified MultiValue file held by the current process. A RELEASE statement with the filevar and recID arguments releases the record lock for the specified record on the specified MultiValue file held by the current process.
An update record lock is automatically released when you write data to the record using WRITE or WRITEV. The WRITEU and WRITEVU commands do not release the update record lock.
An update record lock is automatically released when you delete the record using DELETE. The DELETEU command does not release the update record lock.
CLOSE releases all record locks held on the specified file. ABORT and STOP release all record locks held by the current process.
You can optionally specify an ON ERROR clause. If a record lock release fails, the ON ERROR clause is executed. The statements argument can be the NULL placeholder keyword, a single statement, or a block of statements terminated by the END keyword. A block of statements has specific line break requirements: each statement must be on its own line; there must be a line break between the ON ERROR keyword and the first line.