I am reading a input file and writing into output file
For first run i am getting error at 30 th record and program got abended
for the next run i have to start from the 31st record
how do i Restart the program to write from 31st record
This is a very normal case if some one is working in Production Support Environment.
In this case you'll have to EDIT your INPUT DATASET & DELETE 30 records, so that it starts with 31st record. (But make sure you have a back up of the original dataset ready)
Now you can run your program again & it'll process from 31st record.
I hope you'll take care of other formalities like O/P dataset etc before restarting the job/program again.
Joined: 14 Sep 2005 Posts: 74 Location: Kentucky, USA
This is a very common problem and happens in production job runs. For a long term solution you can keep a file as restart file in the program which contains the number of records processed. When the job abends just restart the job, pick the counter from restart file and read the input file until that counter is reached and then start processing from next record.
For now you can just read the input file 30 times and then start processing from 31 record. Hope this works.
i think rajesh is correct. use acounter in ur program and write the counter to a ps file each time when u read a new record.
when ur program abend u can get the last record u have read from ur ps file.
now u can restart ur program from the desire recored.