Skip to Content
Custom Search

DB2 commit question

2 replies [Last post]
Anonymous

 

A COBOL DB2 program is updating the rows in a table, and there are total 1000 records in the table and I have a DB2 COMMIT issued after every 150 rows update.

 
Would any rows be updated if the job abends after updating say 200 records and if the program is restarted from top would all the 200 records be updated again.
"; ; ; ;
Sponsored Listing
Anonymous
re:DB2 commit question

 

Only 150 recs will be updated by the program if the job abends after 200 rows updation since the commit is only after 150 rows.
 
You should have a restart logic written in the program so that you do not update the already update 150 rows in the program and 
this can be achieved by maintaining a counter after commit.
Anonymous
DB2 Comi

No. It will not update all 200 records from starting because you have given DB2comit  after 150 records. so after 150 it will update. Update will strat from 151.

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 0 users and 27 guests online.
Dr. Radut | forum