I/O Option or Carriage Control

<I/O option or carriage control>

── [ ─┬─────────────┬─<arithmetic expression>─┬─┬────────────────────┬─►
      ├─ CONTROL ───┤                         │ └─ , ── SYNCHRONIZE ─┤
      ├─ LINE ──────┤                         │                      │
      ├─ SKIP ──────┤                         │                      │
      ├─ SPACE ─────┤                         │                      │
      ├─ STACKER ───┤                         │                      │
      ├─ STATION ───┤                         │                      │
      ├─ TIMELIMIT ─┘                         │                      │
      ├─ NO ──────────────────────────────────┤                      │
      ├─ STOP ────────────────────────────────┘                      │
      ├─ SYNCHRONIZE ────────────────────────────────────────────────┤
      └─<subfile specification>──────────────────────────────────────┘
►─ ] ──────────────────────────────────────────────────────────────────┤

If the I/O option or carriage control element is not specified, the record currently addressed by the record pointer is read, and the record pointer is adjusted to point to the next record in the file.

If the I/O option or carriage control element is invalid for the physical file associated with the file designator, it is in general ignored. If the file was declared as a direct file, the I/O option or carriage control is overridden by the limitations of the particular I/O device type.

If the I/O option or carriage control element is an arithmetic expression, its value indicates the zero-relative record number of the record in the file that is to be read. The record pointer is adjusted to point to the specified record before the read is performed, and the record pointer is adjusted after the read operation to point to the next record.

The [CONTROL <arithmetic expression>] construct is meaningful only for KIND=LBP direct files. The construct [CONTROL 1] is a READ modifier used to perform a Read Information operation.

If the I/O option or carriage control element is NO, then the record pointer is not adjusted following the read operation. That is, the record can be read again. This I/O option or carriage control element has no effect if the KIND attribute of the file being read is equal to REMOTE.

If the I/O option or carriage control element is of the form [SPACE <arithmetic expression>], then the number of records specified by the value of the arithmetic expression are skipped. Spacing is forward if the arithmetic expression has a positive value and backward if the arithmetic expression has a negative value.

The [TIMELIMIT <arithmetic expression>] construct, which is meaningful only for remote files, assigns the value of the arithmetic expression to the TIMELIMIT attribute of the file. Refer to the File Attributes Programming Reference Manual for information on the TIMELIMIT attribute. The value of this attribute applies to all subsequent READ and WRITE statements on that file. If the value of the TIMELIMIT attribute is greater than zero and if no input is received within that number of seconds (the value can be fractional), then a time-out error is reported.

The [STATION <arithmetic expression>] construct is meaningful only for remote files. The value of the arithmetic expression is assigned to the LASTSUBFILE attribute of the file. Refer to the File Attributes Programming Reference Manual for information on the LASTSUBFILE attribute.

The [SYNCHRONIZE] and [STOP] constructs are meaningful for the WRITE statement only.

Imported events and event arrays cannot be used as <event designator> s in a direct I/O READ statement.