Record LOCKING

If you set the MS Compiler directive, the LOCKING clause in the SELECT statement is supported.

General Format


Syntax of SELECT statement showing RECORD clause

General Rules

  1. For SEQUENTIAL and LINE SEQUENTIAL files only EXCLUSIVE locking is allowed.
  2. If MANUAL is specified multiple locks can be applied to the file.
  3. If AUTOMATIC is specified a single lock is applied automatically to the current record.
  4. For SEQUENTIAL and LINE SEQUENTIAL files the default LOCKING mode is EXCLUSIVE.
  5. For RELATIVE and INDEXED files the default LOCKING mode is AUTOMATIC.
  6. If the MANUAL option is specified the UNLOCK statement will release all locks.