IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need help to read from the last record processed when ABEND


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top