RELEASE |
![]() ![]() ![]() |
The RELEASE statement releases read, update or file locks.
Format
RELEASE {file.var{, record.id}} {ON ERROR statement(s)}
where
The RELEASE statement operates in three ways according to whether file.var and record.id are specified.
With no file.var or record.id, all file, read and update locks owned by the process on all files are released.
With file.var but no record.id, all locks associated with file.var are released.
With both record.id 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.
Examples
RELEASE STOCK, "ORDER.LIST"
This statement releases any locks on record ORDER.LIST of the file open as STOCK.
RELEASE
This statement releases all file, read and update locks held by the user. |