Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us