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
 
Need help to read from the last record processed when ABEND

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
maheshurstd

New User


Joined: 16 Feb 2006
Posts: 14

PostPosted: Mon Jun 26, 2006 12:02 pm    Post subject: Need help to read from the last record processed when ABEND
Reply with quote

Hi,

My requirement is that i am reading records from the VSAM file & inserting into the DB2 table, while reading from the VSAM file an ABEND has occured e.g I have read 600 records in a file contains 1000 records an ABEND has occured while reading 601st record, In the Next run i want to read from the 600th record not from the begining

would it be possible for to read from the last record processed.if any one has the code please send it or tell me a way to do it.


Thanks in advance

Regards

Mahesh
Back to top
View user's profile Send private message

param_rajesh_2001
Warnings : 1

New User


Joined: 23 Jun 2006
Posts: 18
Location: Bangalore

PostPosted: Mon Jun 26, 2006 2:18 pm    Post subject:
Reply with quote

Hi ,
You know the last Key was read from Vsam file, Move the last successful and issue a START > key command and read the next record .
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Mon Jun 26, 2006 3:21 pm    Post subject:
Reply with quote

Hi I have done this in past.

At my shop, we have a dedicated DB2 table to store the key of last record being processed in conjuction with a commit frequency (passed as parm parameter from JCL).

So, everytime doing the actual updates, we keep track of last record being updated at commit point.

so, if the program abends and you restart it, the program will first read the database table where in the last record updated at the time of issuing the commit.

Simply, using START statement resume the processing from that record.

Please let me know if its still not clear.
(I know, I might have not explained it properly icon_smile.gif )

Thanks,
Parikshit.
Back to top
View user's profile Send private message
maheshurstd

New User


Joined: 16 Feb 2006
Posts: 14

PostPosted: Wed Jun 28, 2006 5:35 pm    Post subject: Re: Need help to read from the last record processed when AB
Reply with quote

Hi Param_rajesh,

How to get the last sucessful read record? please give me the syntax

Thanks

Mahesh
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm

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