DBXUNDO [ TurboIMAGE/XL Database Management System Reference Manual ] MPE/iX 5.0 Documentation
TurboIMAGE/XL Database Management System Reference Manual
DBXUNDO
INTRINSIC NUMBER 422
Rolls back the active sequence of TurboIMAGE/XL procedure calls which are
considered a dynamic transaction.
Syntax
DBXUNDO,base,text,mode,status,textlen
Parameters
base is the name of the array used as 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
the base ID.)
text is an array up to 256 halfwords long that contains
user ASCII or binary data to be written to the log
file as part of the DBXUNDO log record.
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 as follows:
Element Contents
1 If the procedure succeeds, the return
status is 0. Table 5-26 describes
the contents of element 1 when the
procedure does not succeed.
2-4 Unchanged from previous procedure call
using this array.
5-10 Procedure call information. Refer to
"Library Procedure Error Messages" in
appendix A for a description of this
information.
textlen is an integer equal to the number of halfwords to
be logged from the text parameter, or is a negative
integer equal to the number of bytes. Length can
be zero.
Discussion
[REV BEG]
DBXUNDO is called to dynamically roll back a sequence of TurboIMAGE/XL
procedure calls that completed successfully inside a dynamic transaction.
The beginning of such a sequence is designated by a previous call to
DBXBEGIN. DBXUNDO cannot be called to roll back a transaction started by
DBBEGIN or if the database is enabled for AUTODEFER.[REV END]
Logging and DBRECOV are not needed with dynamic transactions, because the
database can be recovered dynamically. However, if the calling process
is logging, DBXUNDO causes a record to be written to the log file to
identify the transaction in the event it needs to be recovered.
CAUTION After DBXUNDO is called, the current record pointer, current
path, current list, and chronological order prior to the call to
DBXBEGIN may not be restored.
[REV BEG]
DBXUNDO returns an error condition if it is called without a prior
matching call to DBXBEGIN. DBXEND is not necessary after DBXUNDO. DBXUNDO
rolls back the entire transaction, and then transactions continue
according to the logic of the program. In general, DBXUNDO or DBXEND
must be the last intrinsic for a dynamic transaction to be executed. It
designates the end of that dynamic transaction.[REV END]
Table 5-26. DBXUNDO Return Status Values
----------------------------------------------------------------------------------------------
| File System, Memory | -215 | XM error nn encountered when rolling out dynamic |
| Management, and | | transaction. |
| Transaction Management | | |
| Failures: | | |
----------------------------------------------------------------------------------------------
| Calling Errors: | -11 | Bad database reference. |
| | -31 | Bad (unrecognized) DBXUNDO mode n. |
| | -151 | Text length greater than 512 bytes. |
| | -218 | Output deferred is incompatible with Dynamic |
| | -219 | Rollback. |
| | | Remote database access is incompatible with Dynamic |
| | -223 | Rollback. |
| | | Cannot DBXEND or DBXUNDO a transaction which was |
| | -237 | not active. |
| | | Cannot DBXEND or DBXUNDO a DBBEGIN transaction. |
----------------------------------------------------------------------------------------------
- Logging System Failures: - -111 - WRITELOG failure. -
----------------------------------------------------------------------------------------------
| Exceptional Conditions: | -231 | During DBX recovery, internal procedure failed; |
| | 67 | error nn. |
| | | DBU disabled; potential damage; only DBCLOSE |
| | | allowed. |
----------------------------------------------------------------------------------------------
Consult appendix A for more information about these conditions.
MPE/iX 5.0 Documentation