There is a requirement in my project. I am working on batch program, it reads value from PS and writes/updates record in DB2 table. When updating the program should have check point and restart functionality.
Consider the following situation:
Suppose if an error occurs after updating the 5th record, then the program should start updting from 6th record not from the first record.
Here the batch program requires the checkpoint and restart functionality. So please advise me with some logic
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
Checkpoint/restart is not implememnted at the program level. . . It is an application or system-wide consideration.
There is no simple/common logic that you can just stick into your code.
In addition to backing out incomplete units of work, all sequential processing also needs to be syncronized for the restart. Any reports, output files, accumulators, etc must be brought back in line during the restart.
Due to exponentially faster processors and dasd, many (becoming most) places have discontinued the use of this. Another reason this is being discontinued for new work is the development expense of incorporating proper restart/recovery into a system.
How are other applicatons running on your system handling restart/recovery? If any systems already do this, you should probably follow the method they use.