POSITION

Define the file position

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
POSITION:pos_spec

Arguments

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).

Discussion

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, 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.

See also