View previous topic :: View next topic
|
Author |
Message |
shammiullah
New User
Joined: 13 Jun 2005 Posts: 24
|
|
|
|
HI GUYZ,
I HAVE 100 RECORDS IN A SEQUENTIAL FILE.I'M LOADING IT IN TO A TABLE.WHILE LOADING IT, AFTER 50 RECORDS THE PROGRAM HAD ABEND.NOW WHILE I START MY PROGRAM I WANT TO READ FROM 51ST RECORD INSTEAD OF STARTING FROM 1ST RECORD.IS THERE ANY RESTART LOGIC THERE.......
THANX IN ADVANCE FOR PROMPT REPLIES.... |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
If I'm reading you correctly, you're reading the recs into an in-memory table in your COBOL pgm.
In that case, after the abend the table entries created by the pgm are gone along with the rest of the pgm's WORKING STORAGE.
For 100 recs it's not worth the restart bother, anyway. |
|
Back to top |
|
|
MainB
New User
Joined: 03 Nov 2005 Posts: 17
|
|
|
|
With COBOL - you will haveto write your own restart logic built into the COBOL program. Given that the input file is sorted you can save the key info from the file after every so many records into a restart file (read-write open) that you want to be your unit of work. Another info in this restart file will be success-end - make it 'NO' always - just before UR pgm has completed processing all the recs from input file make it SUCCESS-YES.
After every unit of work do a commit to table U R inserting and continue with next unit. When and if the program fails - rerun it and make sure the first thing in program is to check the restart file where you are writing the key info - to see if it was a rerun (success-end = 'No') after an abend. If so - pick the last key value written in the file and skip input file upto that key value and start inserting form there. |
|
Back to top |
|
|
|