DBUNLOCK [ TurboIMAGE/XL Database Management System Reference Manual ] MPE/iX 5.0 Documentation
TurboIMAGE/XL Database Management System Reference Manual
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.
[REV BEG]
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.
[REV END]
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 to "Library
Procedure Error Messages" in appendix A
for a description of this information.
Table 5-22. DBUNLOCK Return Status Values
----------------------------------------------------------------------------------------------
| File System, Memory | -4 | MPE file error nn returned by DBUNLOCK on |
| Management, and | | FREADLABEL. |
| Transaction Management | -6 | MPE file error nn returned by DBUNLOCK on |
| Failures: | | FWRITELABEL. |
| | -167 | Cannot begin MPE XL XM transaction: XM error nn. |
| | -199 | Cannot end MPE XL XM transaction: XM error nn. |
----------------------------------------------------------------------------------------------
| Calling Errors: | -11 | Bad database reference. |
| | -31 | Bad mode. |
| | -215 | XM error nn encountered when rolling out dynamic |
| | | transaction. |
| | -222 | Only DBXUNDO allowed when a dynamic transaction |
| | | encounters an error. |
| | -230 | A DBUNLOCK inside a dynamic transaction is not |
| | | allowed. |
| | -231 | During Dynamic Rollback recovery, internal |
| | | procedure failed; error nn. |
----------------------------------------------------------------------------------------------
| Communications Errors: | -102 | DSWRITE failure. |
| | -106 | Remote 3000 data inconsistent. |
| | -107 | NS 3000 or DS 3000 system error. |
----------------------------------------------------------------------------------------------
| Exceptional Conditions: | 63 | DBG disabled; potential damage; only DBCLOSE |
| | | allowed. |
----------------------------------------------------------------------------------------------
Appendix A contains more information about these conditions.
MPE/iX 5.0 Documentation