Multiple choice technology mainframe

What will happen when a file that doesnt exist is opened in I-O mode?

  1. The file will be created and will be opened for reading and writing

  2. The open fails and error occurs

  3. File will be created and opened for writing only

  4. The file will be created and opened for reading only

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In COBOL, opening a non-existent file in I-O (Input-Output) mode causes the open operation to fail, resulting in a file status error (typically 35). Unlike OUTPUT or EXTEND modes, I-O mode requires the file to already exist, so it will not automatically create the file.