Item Subject: [HP3000-L] Dynamic transactions spanning multiple databases in Image
Tony Furnival writes:
> I have a client who wants to work with dynamic transactions
> (DBXBegin/DBXEnd/DBXUndo) that span multiple databases.
Great question.
I'm assuming your client is on a "recent" release of MPE/iX.
Several years ago, the DBX@ calls were greatly hampered by DBUPDATE.
I would try an update and check the return status. If it indicated
a search or sort item changed, I would delete and add. Unfortunately,
if this occurred in a dynamic txn, all subsequent operations FAILED
saying that only 'DBXUNDO' was allowed. I understand that this behaviour
has since changed.
As for a dynamic txn that spans multiple databases, I'm not certain
this is supported.
According to the LaserROM:
- DBXBEGIN supports only 'mode 1'.
- Under "Logical Transactions" in Chapter 7:
"Programmers may be tempted to call DBBEGIN twice (once for each
database), update both databases, and then call DBEND twice in
an attempt to implement this capability. However, a system
failure during the "window" between the two final calls to DBEND
will result in the recovery of the transaction for the first
database and its suppression on the second. To perform a
transaction accessing multiple databases, use a multiple
database transaction [i.e., DBBEGIN mode 3 or 4]."
- Under DBBEGIN, mode 4:
"For example, assume that base IDs 11, 12,
and 13 are involved in a multiple database
transaction. DBBEGIN mode 4 (with base IDs 11, 12, and 13
specified in the baseidlist parameter) generates the
following log record sequence:
MDBXBEGIN (11, 12, 13)
:
database updates
:
MDBXEND (11, 12, 13)"
MDBX ??
Bottom line: Sure, you can use
DBXBEGIN( base1, ... )
DBXBEGIN( base2, ... )
DBXEND ( base2, ... )
DBXEND ( base1, ... )
but like the manual said, you risk a logical inconsistency
in the data if there's a system failure between the
DBXENDs.
I'd like to hear some clarification on this as well.
--Glenn Cole
Software al dente, Inc.
[log in to unmask]
|