View previous topic :: View next topic
|
Author |
Message |
maheshurstd
New User
Joined: 16 Feb 2006 Posts: 14
|
|
|
|
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 |
|
|
param_rajesh_2001 Warnings : 1 New User
Joined: 23 Jun 2006 Posts: 18 Location: Bangalore
|
|
|
|
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 |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
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 )
Thanks,
Parikshit. |
|
Back to top |
|
|
maheshurstd
New User
Joined: 16 Feb 2006 Posts: 14
|
|
|
|
Hi Param_rajesh,
How to get the last sucessful read record? please give me the syntax
Thanks
Mahesh |
|
Back to top |
|
|
|