Multiple choice technology mainframe

For successful execution of REWRITE stmt, the direct access file must be opened in ____ mode. (Fill in the blank with the right answer from the options)

  1. INPUT

  2. OUTPUT

  3. INPUT-OUTPUT

  4. OUT-INPUT

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

The REWRITE statement in COBOL requires the file to be opened in INPUT-OUTPUT mode (I-O). This mode allows both reading and updating records in a direct access file. INPUT mode only permits reading, while OUTPUT mode only permits writing new files.