IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 Savepoint question


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
David Joyce

New User


Joined: 08 Aug 2008
Posts: 17
Location: Boulder Colorado

PostPosted: Sat Apr 24, 2010 2:10 am
Reply with quote

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
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Sun Apr 25, 2010 9:06 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Question for file manager IBM Tools 7
No new posts question for Pedro TSO/ISPF 2
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts panel creation question TSO/ISPF 12
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
Search our Forums:

Back to Top