View previous topic :: View next topic
|
Author |
Message |
David Joyce
New User
Joined: 08 Aug 2008 Posts: 17 Location: Boulder Colorado
|
|
|
|
In a CICS application I have performed one INSERT and two UPDATES and created a savepoint:
SAVEPOINT ABC ON ROLLBACK RETAIN CURSORS
we then:
DELETE FROM TABLEA
WHERE predicate
If SQLCODE = 0 or +100
RELEASE SAVEPOINT ABC
else
ROLLBACK WORK TO SAVEPOINT ABC
we retry the DELETE 5 times, if after the 5th try we are still receiving a
-911 or -904 the transaction fails.
The problem we encounter is, if the DELETE produces a -911 an implicit ROLLBACK is performed so the ROLLBACK WORK TO SAVEPOINT ABC produces a -880 saying SAVEPOINT ABC does not exist. Does the implicit ROLLBACK performed by DB2 wipe out the SAVEPOINT? Thanks. |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi David,
Quote: |
Does the implicit ROLLBACK performed by DB2 wipe out the SAVEPOINT? |
When you get SQLCODE -911, DB2 will rollback to the previous commit point and all the savepoints taken after that commit will be invalidated.
Sushanth |
|
Back to top |
|
|
|