In COBOL, what happens when you open a file in "Output" mode that already exists?

  • It appends the new data to the existing file
  • It deletes the existing file
  • It overwrites the existing file with the new data
  • It raises a compilation error
When a file is opened in "Output" mode in COBOL, it overwrites the existing file with the new data. This mode is used for creating a new file or replacing the content of an existing one.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *