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
 

 

Rollback and commit If I got any abend

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
kumar_jalluri

New User


Joined: 02 Jun 2005
Posts: 24
Location: PUNE

PostPosted: Tue Nov 28, 2006 10:53 pm    Post subject: Rollback and commit If I got any abend
Reply with quote

Hi

I have a question.

I am using three tables for updating in my program.

I have to update these tables only if everything is OK means if the program successfully completes.

If I got any abend (after first update query or 2nd update querys or all 3rd update query) it has to roll back all these updates.

Can anybnody give ur suggestion how to do it?
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Nov 28, 2006 11:14 pm    Post subject: Re: rollback and commit
Reply with quote

Hi kumar,

When your program abends, (if it truly abends), the system will automatically 'rollback' (backout) all of your updates to the last 'commit', or in the absence of a 'commit', to the beginning of your program.

If your program does not, in truth, abend, you can do

EXEC SQL
ROLLBACK
END-EXEC

And all of your updates will be rolled back as if your program abended.

How many rows are you updating and would want rolled back?

Dave
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 IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts S213-14 ABEND explantion Apurva Mehta JCL & VSAM 5 Thu Jul 07, 2016 10:56 pm


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