TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
Chapter 5 235
TurboIMAGE/XL Library Procedures
DBXBEGIN
Mode 3: Indicates a dynamic transaction spanning multiple
databases (DMDBX). If user logging is enabled for the
databases, mode 3 generates multiple entries in the log
file, one for each database.
status
is the name of an array of 10 halfwords in which TurboIMAGE/XL returns
status information. If the procedure executes successfully, the status array
contents are:
Element Contents
1 If the procedure succeeds, the return status is 0. Table
5-24. 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
DBXBEGIN is called to designate the beginning of a sequence of TurboIMAGE/XL procedure
calls that are jointly considered a single dynamic transaction. The end of such a sequence
is designated by a matching call to DBXEND. DBXBEGIN cannot be called if another
transaction started by DBXBEGIN or DBBEGIN is active. The intrinsic does not begin a
dynamic transaction if AUTODEFER is enabled for the database.
Before including a database in a DMDBX, DBXBEGIN mode 3, DBCONTROL mode 7 needs to
have been done
once
for each of the databases in the DMDBX. DBCONTROL mode 7 remains
active until the database is closed or the application terminates. DBCONTROL mode 7 also
enables the database for deadlock detection. If deadlock is encountered, it returns an error
26, instead of triggering a process hang.
NOTE
DBXBEGIN is not allowed with DBOPEN mode 2 nor with AUTODEFER enabled.
Logging and DBRECOV are not needed with dynamic transactions, because the database can
be recovered dynamically. However, if the calling process is logging, DBXBEGIN causes a
record to be written to the log file to identify the beginning of a dynamic transaction.