I have a natural program which reads the DB file and after some processing write the details in output work file and updates DB file. However after processing some records the job fails, so when i restart i want the program to write the records to the work file in such a way that it should overwrite the already written records (only the selected) from the desired record position. You can consider the below scenario
The failure occurs after the data is written to flat file and before the update has happened…so the question is how to overwrite the data written in the file when we restart the job.
Suppose after writing 20 records in the output file the job failed but when i restart program should write the data starting from 18th record.
Using DISP=MOD will append the records at the end of the file but not from the desired position.