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

For REWRITE to work successfully, the file must be opened in I-O mode. INPUT mode only allows reading, OUTPUT mode is for creating new files, and I-O mode allows both reading and updating existing records. REWRITE modifies an existing record, so it requires the update capability provided by I-O mode.