My Cobol program is updating the database. Assume my Input file is having 1000 records. While processing the input file it got abended at 450 record but it went fine(updation to database) till 449th record and also comit was performed till 449th. Now i need to restart the program from 450th record. Can you please tell me the way to have this record number in a temporary buffer till the completion of 1000th record in the case of restart?. also I need to read this temporary buffer incase of restart.
I am restarting from the run cobol step but it should start from 450th recored.
Right now my situation is I cant use database due to some internal issue for this scenario.
Joined: 14 Jul 2008 Posts: 1239 Location: Richfield, MN, USA
Three methods come to mind initially:
1. If these abends happen infrequently, remove the 1st 449 records from the input file and restart.
2. Use a restart file to keep track of the last input record processed. Your restarted program would read this file and know where to resume processing. This method would involve lots of I/O due to the fact you'd need to close and reopen the file for every input record.
3. Commit only at end of the unit of work.
The method you use will depend on your input volume.
In my shop, we use something called AR/CTL (application restart cntl); a BMC software. It needs certain restart variables (last read record, counters etc) which are saved and retrieved back in case of a restart run. The program continues from the record for which it abended.