TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
228 Chapter5
TurboIMAGE/XL Library Procedures
DBUNLOCK
DBUNLOCK
INTRINSIC NUMBER 410
Relinquishes the locks acquired by all previous calls to DBLOCK. Redundant calls are
ignored. If the calling process has the same database opened multiple times, only those
locks put into effect for the specified access path are unlocked.
If DBUNLOCK is called when a dynamic transaction is active and a modify intrinsic (DBPUT,
DBDELETE, or DBUPDATE) has already been used in the dynamic transaction (that is, the
database is modified), the DBUNLOCK fails. You must check the error condition. You may use
DBERROR or DBEXPLAIN to display the error message. When a DBUNLOCK fails within the
dynamic transaction, dynamic intrinsic rollback allows the following choices:
• Use DBXEND to end the dynamic transaction.
• Continue with the remainder of the dynamic transaction taking into account that
DBUNLOCK failed and locks are still in place.
• Use DBXUNDO to rollback the entire dynamic transaction.
Syntax
DBUNLOCK,
base,dset,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.
dset
is currently unused. Use the Not_Used_Parm or DUMMY variable as
recommended at the beginning of this chapter or any
dset
array used for
other procedures.
mode
must be an integer equal to 1.
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-22. describes the contents of element 1 when the
procedure does not succeed.
2 Number of lock descriptors released by this call. Each data
set lock or database lock is counted as one descriptor.
3-4 Reserved for internal use.
5-10 Information about the procedure call and its results. Refer