SEEK Statement

The SEEK statement positions the record pointer for the designated file at the specified record. This record is read or written by the next serial I/O operation.

<seek statement>

── SEEK ── ( ──<file designator>── [ ──<record number>── ] ── ) ───────┤

<record number>

──<arithmetic expression>──────────────────────────────────────────────┤

A serial I/O operation is a READ statement or WRITE statement that does not include a record number in the record number or carriage control part. The SEEK statement does not affect any nonserial I/O statements. The value of the record pointer is not saved when the file is closed.