TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
Chapter 5 207
TurboIMAGE/XL Library Procedures
DBLOCK
NOTE
Be careful when changing modes. The qualifier parameter can change.
Table 5-15. Locking Mode Options
Lock
Mode
Lock
Level
Locking Type Description
1 Base Unconditional DBLOCK applies an unconditional lock to the whole
database, returning to the calling program only after the
lock is successful (or if an error occurs). The qualifier
parameter is ignored.
2 Base Conditional DBLOCK applies a conditional lock to the database and
returns immediately. A return status of zero indicates
success. A non-zero return status indicates the reason for
failure. (Refer to Table 5-17.)
3 Set Unconditional DBLOCK applies an unconditional lock to a data set. The
qualifier parameter must specify the name of an array
containing the left-justified name of the data set or the
name of an integer referencing the data set number. The
data set name can be 16 characters long or, if shorter,
terminated by a semicolon or blank.
The data set need not be accessible for read or write access
to the user requesting the lock.
4 Set Conditional DBLOCK applies a conditional lock of the same type as mode
3. It always returns to the calling program immediately. A
return status of zero indicates success and a non-zero
return status indicates a reason for failure. (Refer to Table
5-17.)
5 Entry Unconditional DBLOCK applies unconditional locks to the data entries
specified by lock descriptors. The qualifier parameter must
specify the name of an array containing the lock descriptors.
The format of the array is shown in Figure 5-2. It returns
only when all the locks have been acquired.
6 Entry Conditional DBLOCK applies conditional locks of the same type as mode
5. If multiple lock descriptors are specified and DBLOCK
encounters a lock descriptor that it cannot apply, it returns.
All locks that have been applied until that point are
retained.
Because the locks are not executed in the order supplied by
the user, it is not predictable which locks are held and
which are not after an unsuccessful mode 6 DBLOCK. Status
element 2 indicates how many lock descriptors were
actually successful. It is recommended that a DBUNLOCK be
issued after any unsuccessful mode 6 DBLOCK.