IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Loading a File to Table abended at the Middle: How to Resume


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shammiullah

New User


Joined: 13 Jun 2005
Posts: 24

PostPosted: Thu Nov 17, 2005 1:38 am
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Nov 17, 2005 6:55 am
Reply with quote

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
View user's profile Send private message
MainB

New User


Joined: 03 Nov 2005
Posts: 17

PostPosted: Thu Nov 17, 2005 9:27 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top