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 Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm


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