Before the REWRITE is performed, the record must be open and read from the file. Therefore, the file must be opened in I-O mode for rewrite functionality.