Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Loading a File to Table abended at the Middle: How to Resume
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us