UNLOCK

Releases record locks.

UNLOCK
Obj (Oject Name | *DTAARA)
Err (Indicator Variable | *EXTENDED)

Parameters

Obj

Required. Contains the name of the file, field, data structure or DS field name. You can also specify the special name * DTAARA , which will cause the unlocking of all previously locked data areas in the program.

Err

Optional. Determines what the runtime will do if an error occurs while executing this command. The following rules apply:

  • Err (Indicator Variable) - The specified Indicator is set if an error occurred.
  • Err (*EXTENDED) - A program status flag is set whose status can be checked using the %ERROR built-in function.
  • If the Err keyword is not given and an error occurs, a runtime exception will be thrown.

Remarks

UNLOCK allows the most recently locked record to be unlocked for an update disk file.

See Also

DCLDISKFILE

READ

UPDATE