Technical data

Programming Features
5.12 RMS Locking Enhancements
Table 5–2 (Cont.) Methods Available for Specifying No Query Record Locking
To... Use This Method...
Enable no query record locking on a
per-record read operation.
Set the RAB$V_NQL option in the RAB$W_ROP_2 field.
The RAB$V_NQL option takes precedence over all other record
locking options. Use only if the current read ($GET or $FIND)
operation is not followed by an $UPDATE or $DELETE call.
Enable no query record locking at the file
level.
Set the FAB$V_NQL option in the FAB$B_SHR field to request
that RMS use no query locking for the entire period the file is
open for any read record operation with both RAB$V_NLK and
RAB$V_RRL options set in the RAB$L_ROP field.
This option can be used with any combination of the other
available FAB$B_SHR sharing options. Keys on RAB$V_NLK
and RAB$V_RRL options in applications.
RMS precedence for the no query record locking option is as follows:
The RAB$V_NQL option set in the RAB$W_ROP_2 field
At file open (and applied, if RAB$V_NLK and RAB$V_RRL are set for the
read operation):
The FAB$V_NQL option set in the FAB$B_SHR field
The SET RMS_DEFAULT/QUERY_LOCK=DISABLE setting at the
process level
The SET RMS_DEFAULT/QUERY_LOCK=DISABLE setting at the
system level. If the process /QUERY_LOCK setting equals SYSTEM_
DEFAULT (the default when the process is created), RMS uses the system
specified value.
For more information, see OpenVMS Record Management Services Reference
Manual.
5.12.2 Record Locking Options to Control Deadlock Detection
RMS uses the distributed Lock Manager ($ENQ system service) for record
locking.
To help prevent false deadlocks, the distributed Lock Manager uses the following
flags for lock requests:
Flag
1
Purpose
LCK$M_NODLCKWT When set, the lock management services do not consider this
lock when trying to detect deadlock conditions.
LCK$M_NODLCKBLK When set, the lock management services do not consider this
lock as blocking other locks when trying to detect deadlock
conditions.
1
Improper use of these flags can result in the lock management services ignoring genuine deadlocks.
For complete flag information, refer to the $ENQ section of the OpenVMS System Services Reference
Manual: A–GETUAI.
In previous releases, RMS did not set these flags in its record lock requests.
Programming Features 5–15