Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

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