Top  Previous  Next


The RELEASE statement releases read, update or file locks.





RELEASE {file.var{,}} {ON ERROR statement(s)}




file.varis the file variable associated with the file.


record.idevaluates to the key of the record to be unlocked.


statement(s)are statements to be executed depending on the outcome of the operation.



The RELEASE statement operates in three ways according to whether file.var and are specified.


With no file.var or, all file, read and update locks owned by the process on all files are released.


With file.var but no, all locks associated with file.var are released.


With both and file.var, a specific lock is released.


The ON ERROR clause is executed if a fatal error occurs. The STATUS() function can be used to obtain an error code to determine the cause.


The RELEASE statement has no effect inside a transaction.







This statement releases any locks on record ORDER.LIST of the file open as STOCK.





This statement releases all file, read and update locks held by the user.