Page 1 of 1

DB2 COMMIT??

PostPosted: Mon Oct 20, 2008 9:36 pm
by ninudvictor
Hi All,
I am doing UPDATE in two tables in a single program (Program with Checkpoint Restart Logic).
I want to commit the changes after processing five records.So is it reuired to mention two COMMIT
to save the changes in two different table?

My question is - If there are 'n' no. of tables to be updated, is it reuired to give 'n' no. of
EXEC SQL
COMMIT WORK
END-EXEC
?
Or only one COMMIT is sufficient to save all the changes made to 'n' no. of tables.

Many Thanks in advance.
Nihar

Re: DB2 COMMIT??

PostPosted: Tue Oct 21, 2008 2:58 am
by dick scherrer
Hello,

One COMMIT handles everything that has been added/deleted/changed since the last checkpoint.

If you are implementing checkpoint/restart, keep in mind that files other than database tables must be syncronized on a restart. This is also tru of any report(s) being created by the process.