View previous topic :: View next topic
|
Author |
Message |
kedianirmal
New User
Joined: 08 Feb 2008 Posts: 82 Location: Bangalore, India
|
|
|
|
Hi,
To rewrite a record in sequential file we have to first read the record and then give rewrite.
My requirement is if while reading the file End Of File is reached COBOL should start writing new records into the O/P file instead of REWRITE.
So is it possible to give write command after EOF is encountered?
Thanks,
Nirmal |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
You should NEVER rewrite to a file - if your program fails your output file is corrupted. Write to a new file - maybe a +1 generation otherwise just to another file and rename after successful completion. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
topic already flogged to death.
review the requirement and the approach
topic locked in order not to waste time / resources |
|
Back to top |
|
|
|