TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
158 Chapter5
TurboIMAGE/XL Library Procedures
DBEND
Element Contents
1 If the procedure succeeds, the return status is 0. Table 5-8.
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 to be
logged. Length can be zero.
Discussion
DBEND is called to designate the end of a sequence of TurboIMAGE/XL procedure calls
which are collectively considered a static or multiple database transaction. The beginning
of such a sequence is designated by a previous call to DBBEGIN.
NOTE
DBEND is not valid if a transaction was begun with DBXBEGIN. DBEND checks
for any active dynamic transactions before executing.
If the process is logging, DBEND causes a log record to be written to the log file which
includes such information as the time, date, and user text buffer. DBEND log records are
used by the database recovery program DBRECOV to identify the end of static and multiple
database transactions. However, if a program aborts, a static or multiple database
transaction that has not been completed by a call to DBEND will be recovered by default. For
additional information, refer to the discussion of the ABORTS and NOABORTS options
under the description of the DBRECOV >CONTROL command in chapter 8.
If you call DBEND with mode 2 or 4 and logging is enabled, DBEND forces the log buffer to be
written from memory to disk before returning to the calling process. This flush of the log
buffer occurs after the intrinsic has logged the end of the logical transaction. Use this
option only for critical transactions; too many mode 2 or mode 4 DBEND calls can degrade
performance by causing a disk access each time a static or multiple database transaction
ends.
NOTE
When you call DBEND with mode 2 or 4 to force writing a static or multiple
data base transaction to disk, logging must have been enabled prior to
executing the transaction.
DBEND returns an error condition if it is called without a prior matching call to DBBEGIN,