There is a scenario. You're running a job which will update the bulk of records. When you run the job, only 100 records are processed and the job abends. Also you have committed the changes through program using COMMIT.
Now you want to process from the 101st record. How will you put the restart logic through the COBOL program?
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
This is not typically a matter to be addressed by/in a single program.
If you decide to actually implement checkpoint/restart, it should at least be done across the application. Many places defne this process to cover everything that runs within a given database environment.
There is no "standard" for providing checkpoint/restart. Each implementation depends on the system/environment and the recoverability requirements.
I'd suggest you first ask you management or database support people if there is already a methodology in place for your system.
If you decide to experiment, make sure that your restart process includes getting all of the reports and any non-database data back in sync. You will want to bypass the already committed database updates, but will need to handle counters, report outputs, etc.
Joined: 22 Apr 2006 Posts: 6258 Location: Mumbai, India
Checkpoint and Restart facilities are some of the most important features supported by IMS. This method is used in the IMS programming environment to ensure data integrity. When we issue a checkpoint, it signals the IMS Control environment that the application program wants to commit all changes made to the database. Once an IMS checkpoint is successfully taken, IMS, the application program, the programmer who supports the application, and the end users now have a reference point that assures that in case of a hardware/software abend we can recover the data back to the point where the checkpoint was taken.
But if you need to do this when you are using DB2 as Data Base, one way can be using GSAM files instead of QSAM. I've never implemented this still it should be a starting approach.
Hope this helps.