POSITION

Define the file position

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
POSITION:pos_spec

pos_spec

One of the following identifiers or corresponding values: (n)

Q_IGNPOS or -1

Ignore the POSITION qualifier.

Q_FIRST or 0

Position to the first record in the file (relative to the key of reference, if it’s an ISAM file).

Q_LAST or 1

Position to the last record in the file (relative to the key of reference, if it’s an ISAM file). (Windows, Unix only)

Q_EOF or 2

Position to the end of the file without establishing a current record. (Windows, Unix only)

Q_BOF or 3

Position to the beginning of the file without establishing a current record (valid on FIND only).

The POSITION qualifier sets the file position before performing the I/O operation.

By default, the OPEN statement positions to the first record in the file. OPEN only recognizes the Q_FIRST and Q_EOF identifiers.

The FIND statement only recognizes the Q_FIRST, Q_LAST, and Q_BOF identifiers.

The READ statement only recognizes the Q_FIRST and Q_LAST identifiers.

For non-ISAM files, the WRITE statement only recognizes Q_FIRST, Q_LAST, and Q_EOF identifiers.