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.
Loading...
Related Quiz
- How can the FUNCTION LENGTH intrinsic function be used to determine the length of a string in COBOL?
- In COBOL, the _____ feature of indexed files allows you to efficiently handle duplicate keys.
- What is the significance of the FILE SECTION in the COBOL Data Division?
- During debugging, the _____ statement in COBOL is often used to display variable values and messages.
- In COBOL, the _______ clause is used to declare exception conditions that can be raised during program execution.