Hello,
Is this somethng for class or for actual work?
Here no database is involved and it is a pure batch file processing program.
How do you intend to keep track of the restart point if not written/committed to a restart table or ?
There is more to a program than input. . .
All output needs to be re-syncronized - including totals that were being accumulated.
Places that use this type of restart have well-documented processes on how to handle a restart - you do not just "make one up" for a given program.
With today's bigger/faster computers, many places have gotten away from using checkpoint/restart. It is faster and safer to re-run from the beginning than try to re-start in the middle.
The simplest pseudo-code wuld be:
Begin
If a restart, re-sync.
Process from where we are now (beginning or restart point).
End