Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 -502 Error - Cursor already open anand jeyapaul DB2 7 Sun Oct 29, 2017 4:22 am
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us