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

Rewrite in Sequential file


IBM Mainframe Forums -> COBOL Programming
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
kedianirmal

New User


Joined: 08 Feb 2008
Posts: 82
Location: Bangalore, India

PostPosted: Mon Dec 24, 2012 7:40 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Dec 24, 2012 7:57 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Dec 24, 2012 8:00 pm
Reply with quote

topic already flogged to death.
review the requirement and the approach
topic locked in order not to waste time / resources
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top