Technical data

Programming Features
5.12 RMS Locking Enhancements
an RMS$_RLK status. Otherwise, the record is returned with one of the following
statuses:
RMS$_SUC No other writers
RMS$_OK_RLK Record can be read but not written
RMS$_OK_RRL Exclusive lock is held (lock request denied) but the read-
regardless (RAB$V_RRL) option is set
When only the RAB$V_NLK option is specified, record access can be denied.
When both the RAB$V_NLK and RAB$V_RRL options are specified, an
application can guarantee the return of any record with a success or alternate
success status.
This release introduces the no query record locking option, which allows
applications to read records (using $GET or $FIND services) without any
consideration of record locking. This option:
Does not make a call to the Lock Manager
Is equivalent to both RAB$V_NLK and RAB$V_RRL being set except that the
RMS$_OK_RLK or RMS$_OK_RRL status will not be returned
This functionality is independent of bucket locks. It applies to both local and
global buffers and to all three file organizations (sequential, relative, and
indexed).
Three alternate methods for specifying the no query record locking option are
outlined in Table 5–2.
Note the following:
The first method allows the option to be enabled externally, potentially
without any application change.
You should use any of the methods only as appropriate for the application. In
particular, you should check for any dependency in an existing application on
the alternate success status RMS$_OK_RLK or RMS$_OK_RRL.
Table 5–2 Methods Available for Specifying No Query Record Locking
To... Use This Method...
Disable query record locking at the
process or system level.
Enter the following DCL command to request that RMS use no
query record locking for any read operation with both RAB$V_
NLK and RAB$V_RRL options set in the RAB$L_ROP field:
$ SET RMS_DEFAULT/QUERY_LOCK=DISABLE[/SYSTEM]
Keys on RAB$V_NLK and RAB$V_RRL options in existing
applications.
(continued on next page)
5–14 Programming Features