HP 3000 Manuals

DBXBEGIN [ TurboIMAGE/XL Database Management System Reference Manual ] MPE/iX 5.0 Documentation


TurboIMAGE/XL Database Management System Reference Manual

DBXBEGIN 

INTRINSIC NUMBER 420 

Designates the beginning of a sequence of TurboIMAGE/XL procedure calls
that are to be regarded as a dynamic transaction for the purposes of
logging and dynamic roll-back recovery.  The text parameter can be used
to log user information to the log file.  DBXBEGIN is used in conjunction
with DBXEND to begin and end a dynamic transaction.

Syntax 

     DBXBEGIN,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 the name of 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 DBXBEGIN log
                      record.  The text argument is used to assign each
                      particular transaction a distinct name.  (Refer to
                      "Discussion" below for more information.)

mode                  must be a halfword equal to 1.

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.


NOTE DBXBEGIN is not allowed with DBOPEN mode 2.
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. Table 5-24. DBXBEGIN Return Status Values ---------------------------------------------------------------------------------------------- | File System, Memory | -228 | DBXBEGIN encountered XM error nn when starting | | Management, and | | dynamic transaction. | | Transaction Management | | | | Failures: | | | ---------------------------------------------------------------------------------------------- | Calling Errors: | -11 | Bad database reference. | | | -31 | Bad (unrecognized) DBXBEGIN mode: n. | | | -151 | Text length greater than 512 bytes. | | | -152 | DBXBEGIN called while a transaction is in progress. | | | -217 | DBOPEN mode n incompatible with Dynamic Rollback. | | | -219 | Remote database access incompatible with Dynamic | | | | Rollback. | | | -221 | Cannot begin transaction when a dynamic transaction | | | | is active. | | | -222 | Only DBXUNDO allowed when a dynamic transaction | | | | encounters an error. | ---------------------------------------------------------------------------------------------- - Logging System Failures: - -111 - WRITELOG intrinsic failure. - ---------------------------------------------------------------------------------------------- | Exceptional Conditions: | 67 | DBU disabled; potential damage; only DBCLOSE | | | | allowed. | ---------------------------------------------------------------------------------------------- Consult appendix A for more information about these conditions.


MPE/iX 5.0 Documentation