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

Commit or rollback when an error occured at the 100th row


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

New User


Joined: 07 Nov 2006
Posts: 16
Location: banglore

PostPosted: Wed Nov 29, 2006 2:48 pm
Reply with quote

Suppose there are 1000 rows in a table.A program that updates 100 rows of that table. after updating 99 rows, an error occured at the 100th row. what will happens? there is no updation will occur but the confusion is that no updation, (commit/ rollback)?

no updation , commit?

OR

no updation, rollback?
which will happen?
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Nov 29, 2006 3:06 pm
Reply with quote

Hi There,

I think it will be no updation, rollback if we do not have any explicit commit in r program

Corrections r welcome
Back to top
View user's profile Send private message
Farooq

New User


Joined: 24 Nov 2006
Posts: 15
Location: Chennai

PostPosted: Wed Nov 29, 2006 4:30 pm
Reply with quote

HI

I too agree with Ekta

Thanks!
Farooq
Back to top
View user's profile Send private message
arunpvarier

New User


Joined: 07 Nov 2006
Posts: 16
Location: banglore

PostPosted: Wed Nov 29, 2006 5:01 pm
Reply with quote

hai

Thanks for the reply

arun
Back to top
View user's profile Send private message
Sarva_bubli

New User


Joined: 09 Aug 2006
Posts: 37
Location: Pune, India

PostPosted: Fri Dec 01, 2006 8:51 pm
Reply with quote

It will be no updation and rollback.
Back to top
View user's profile Send private message
leo_sangha

New User


Joined: 11 Aug 2005
Posts: 85
Location: England

PostPosted: Thu Jan 11, 2007 1:41 pm
Reply with quote

In this case when there is an error in 100th row ..
What is happening to the job is it abending or completing with CC=00?

Because i believe if you are using Rollback in the code then
No Updation & Rollback will happen if job ends successfully?
Updation will happen till the 99th row if you are abending the job?
Back to top
View user's profile Send private message
kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Thu Jan 11, 2007 6:40 pm
Reply with quote

Hi,
As of I know, for a single program if Commis not specified, the program commits at last. That means only when there is RC of 0 or 4.

To tell how does the roll back really work in DB2

For every insertion and updation in the table there creates a log that is used internally by the DB2. When ever you get abend then the log will be revented back so that the previous stable database is maintained.

If a succefull insertion or updation, the log will be automatically deleted and that will be your stable database at present.
Back to top
View user's profile Send private message
ramupinnu

New User


Joined: 10 Apr 2006
Posts: 4
Location: Bangalore

PostPosted: Thu Jan 11, 2007 6:40 pm
Reply with quote

If there is a exclusive commit statement in the program then upto 99 records will be updated.otherwise no records will be updated
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top