# Record I/O Statement Specifiers

After you open a file or use a preconnected file, you can use the following statements:

- READ, WRITE, ACCEPT, and PRINT to perform record I/O.

- BACKSPACE, ENDFILE, and REWIND to set record position within the file.

- DELETE, REWRITE, TYPE, and FIND to perform various operations.

The record I/O statement must use the appropriate record I/O form (formatted, list-directed, namelist, or unformatted).

You can use the following specifiers with the READ and WRITE record I/O statements:

- UNIT specifies the unit number to or from which input or output will occur.

- END specifies a label to branch to if end-of-file occurs; only applies to input statements on sequential files.

- ERR specifies a label to branch to if an error occurs.

- IOSTAT specifies an integer variable to contain the error number if an error occurs.

- FMT specifies a label of a FORMAT statement or character data specifying a FORMAT.

- NML specifies the name of a NAMELIST.

- REC specifies a record number for direct access.

When using nonadvancing I/O, use the ADVANCE, EOR, and SIZE specifiers.

When using the REWRITE statement, you can use the UNIT, FMT, ERR, and IOSTAT specifiers.

Parent topic: Fortran I/O