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 Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm


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