Skip to main content
Previous sectionNext section

$ZPOS

Contains the current file position during the reading of a sequential file.

Synopsis

$ZPOS

Description

$ZPOS contains the current file position during sequential file reads. If no sequential file read is in progress, $ZPOS contains 0 (zero).

When you open a file for sequential reads, each READ from that device sets $ZPOS to the position within the file at which the next read will occur. The $ZPOS value is the actual file offset in bytes at the conclusion of a READ, READ *, or READ #n. The user must take appropriate care when reading multi-byte character sets.

The current file position can be set using the $ZSEEK function. This special variable cannot be modified using the SET command. Attempting to do so results in a <SYNTAX> error.

See Also