## 13.5.18 NEXTREC Specifier

The NEXTREC specifier asks where the next record can be read or written in a file connected for direct access. It takes the following form:

  NEXTREC = nr
  nr
  Is a scalar integer variable that is assigned a value as follows:
  - If the file is connected for direct access and a record (r) was previously read or written, the value assigned is r + 1.
  - If no record has been read or written, the value assigned is 1.
  - If the file is not connected for direct access, or if the file position cannot be determined because of an error condition, the value assigned is zero.
  - If the file is connected for direct access and a REWIND has been performed on the file, the value assigned is 1.

Previous Page Next Page Table of Contents