TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
Appendix D 647
Multiple Calls to DBLOCK
Conditional Locks
Conditional Locks
During a DBLOCK, if TurboIMAGE/XL discovers a lock descriptor that is identical to one
previously put into effect by the same user through the same access path, it ignores the
latest lock descriptor. For example, the lock descriptor SALES:ACCOUNT = 89393899 is
ignored if SALES:ACCOUNT = 89393899 was locked earlier on the same access path.
However, it will not be ignored if a lock descriptor such as SALES: @ has been specified
earlier.
If multiple lock descriptors are specified with mode 6 (conditional data entry locking),
TurboIMAGE/XL indicates how many locks have been applied when it returns (status
element 1) to the calling process. It does not release the successful locks even though all
the requested locks have not been applied. Because TurboIMAGE/XL ignores identical lock
descriptors specified a second time, it is possible to call DBLOCK again with the same
descriptor list (if the program has MR capability). Those lock descriptors that are already
in effect will be ignored and the others will be tried again. The second element of the status
array contains the number of descriptors successfully locked in each call. This technique
will not cause deadlocks provided the lock descriptor list is not altered.