Skip to main content

$ZPOSITION (ObjectScript)

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




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

When you open a file for sequential reads, each READ from that device sets $ZPOSITION to the position within the file at which the next read will occur. The $ZPOSITION 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

FeedbackOpens in a new tab