TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)

Chapter 5 205
TurboIMAGE/XL Library Procedures
DBLOCK
DBLOCK
INTRINSIC NUMBER 409
Applies a logical lock to a database, one or more data sets, or one or more data entries.
Syntax
DBLOCK,
base,qualifier,mode,status
Parameters
base
is the name of the array used for the base parameter when opening the
database. The first element of the array must contain the base ID returned
by DBOPEN. (Refer to DBOPEN for more information about base ID.)
qualifier
Modes 1 and 2: Ignored.
Modes 3 and 4: An integer variable referencing the data set number or
the name of an array containing a data set name. Could also be "@", when
applying a database lock.
Modes 5 and 6: The name of the array containing the lock descriptors.
The format for lock descriptors is given in Figure 5-2.
Use care when changing modes. The qualifier parameter can also change.
mode
contains an integer indicating the type of locking desired (refer to Table
5-15.).
NOTE
If the database is open in user access mode 1, a lock must be in effect on
either the data set or the whole database when adding to or deleting from
master data sets. If a data entry level lock is specified, any subsequent
DBPUTs or DBDELETEs will fail with error number 12 and the following
message is returned:
intrinsic name
CALLED WITHOUT COVERING LOCK IN EFFECT
Note, however, that a lock on either the entire database or data set can be
achieved with a data entry lock when an @ sign is used to specify either all
data sets or all data items.
status
is the name of an array of 10 halfwords in which TurboIMAGE/XL returns
status information about the procedure. If the procedure executes
successfully, the status array contents are:
Element Contents
1 If the procedure succeeds, the return status is 0. Table
5-17. describes the contents of element 1 when the
procedure does not succeed.