View previous topic :: View next topic
|
Author |
Message |
mrvijay27
New User
Joined: 05 Aug 2010 Posts: 1 Location: chennai
|
|
|
|
my requirement is to delete the records which are 1yr old.
eg: if today is 20100805, then in my file the records having the date 20090805 should not be there. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
If the file is sequential, you'll need to read each record, decide whether or not to keep it, then write the records to be kept to a new file.
If the file is VSAM KSDS, you can directly delete the records -- but you'll need logic to process through the file sequentially unless the date field is part of a key. |
|
Back to top |
|
|
rz061m
New User
Joined: 03 Mar 2006 Posts: 48 Location: Chennai
|
|
|
|
If sequential file, Read it untill end of file and check for the date. Its staright forward, let us know if you are struck somewhere while coding. |
|
Back to top |
|
|
|