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
 

 

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 IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm


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