Multiple choice technology mainframe

For successful execution of REWRITE stmt, the direct access file must be opened in _____ mode.

  1. I

  2. O

  3. I-O

  4. O-I

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

The REWRITE statement in COBOL is used to update an existing record in a file. To replace a record, the file must be opened in I-O (Input-Output) mode, which allows both reading and writing. Opening in INPUT or OUTPUT modes is insufficient for updates.