LOCK

Control record locking

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
LOCK:lock_spec

lock_spec

One of the following identifiers or corresponding ­values: (n)

Q_NO_LOCK or 0

Do not lock the record.

Q_AUTO_LOCK or 1

Perform automatic locking on the record. (default)

Q_MANUAL_LOCK or 2

Perform manual locking on the record.

Q_NO_TLOCK or 3

Do not lock the record or probe the index tree.

The LOCK qualifier specifies whether the operation requires a record lock.

Manual locking is similar to automatic locking, except that manual locking blocks all update reads until either the channel is closed, an explicit ­UNLOCK with the RFA qualifier specified is performed, or the FREE subroutine is called.

Note

On Windows and Unix, manual record locking is available only for ISAM files. If you specify a manual lock on a relative (or other) file, an automatic lock will be applied.

OpenVMS allows manual locks on RMS ISAM and relative files.

Q_NO_LOCK allows you to read a locked record with a READ or READS statement when it’s opened in update mode. The read record is not locked.

Q_MANUAL_LOCK applies a manual lock for the record stored with a STORE statement or read by a FIND, READ, or READS statement.

On Windows and Unix,

Q_NO_TLOCK and Q_NO_LOCK are synonymous on OpenVMS systems.

On the OPEN statement for both non-ISAM and ISAM files, the Q_NO_LOCK and Q_AUTO_LOCK are the only valid options for the LOCK qualifier.

On the STORE statement, Q_NO_LOCK and Q_MANUAL_LOCK are the only valid options for the LOCK qualifier.