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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Commit or rollback when an error occured at the 100th row
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: 1187
Location: Bangalore,India

PostPosted: Wed Nov 29, 2006 3:06 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject: Re: Commit or rollback when an error occured at the 100th ro
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    Post subject: Re: Commit or rollback when an error occured at the 100th ro
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    Post subject: Re: Commit or rollback when an error occured at the 100th ro
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    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 OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm


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