View previous topic :: View next topic
|
Author |
Message |
Aniyaa
New User
Joined: 07 Dec 2007 Posts: 26 Location: Bangalore
|
|
|
|
In my cobol db2 update program ,
To implement the checkpoint logic , we use a sequential file which we will => populate before the updation.
=> commit
=> Close file after every commit .
Again Open file bfore the updation . The purpose of opening and closing file being , at any time there is only one record in the file , which can be read and restart will process from there..
I want to know if there is a more efficient way of storing the checkpoint , instead of openiing and closing the file everytime. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
use a db2 table (most shops call them RESTART). Using a sequential file (the closing and reopening is not necessary if it is qsam) is a 'stone wheel and hammer' approach for modern computer technology.
not really important but updation is not an english word/verb or a computer term. UPDATE (or update) is the word. Use all caps to indicate a DB2 table action if you wish. |
|
Back to top |
|
|
Aniyaa
New User
Joined: 07 Dec 2007 Posts: 26 Location: Bangalore
|
|
|
|
Thanks for your suggestions ,
Yes I have heard abt the RESTART table before ,
We UPDATE the restart table every time a COMMIT is done .
At any point of time , there is only ONE record in the RESTART table ? which we would READ after a Abend. |
|
Back to top |
|
|
TG Murphy
Active User
Joined: 23 Mar 2007 Posts: 148 Location: Ottawa Canada
|
|
|
|
Most shops use a DB2 RESTART table that is shared by many batch jobs. In which case the table might have several rows... |
|
Back to top |
|
|
Aniyaa
New User
Joined: 07 Dec 2007 Posts: 26 Location: Bangalore
|
|
|
|
Thanks for all the information |
|
Back to top |
|
|
|