Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DB2 Savepoint question

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: DB2 Savepoint question
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: 1013
Location: India

PostPosted: Sun Apr 25, 2010 9:06 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts SQL Order By related question Joseph K Thomas DB2 8 Fri Mar 18, 2016 12:53 pm
No new posts DFSort Question krrp DFSORT/ICETOOL 9 Mon Mar 07, 2016 7:11 pm
No new posts Question: REORG on LOB tablespaces rakesh1155 DB2 1 Fri Aug 14, 2015 2:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us