Which all modes of opening is required when WRITE is used?
-
Input
-
Output
-
Input-Output
-
Extend
B,C
Correct answer
Explanation
In COBOL, the WRITE operation requires the file to be opened in OUTPUT mode (for creating new records in a new file) or INPUT-OUTPUT mode (for updating existing records in indexed or relative files). INPUT mode is only for reading, and EXTEND is for adding records to the end of an existing file.