WEOF
ANSI
The WEOF instruction establishes the End Of File (EOF) point at the position indicated. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
file
Required. A previously defined and opened FILE variable in which the end of file position is updated.
record
Required. A previously defined Numeric Variable or Expression that selects the position for the end of file.
Flags Affected: NONE
Note the following:
If {record} is zero (0) or greater, it indicates a random sector number. The End Of File (EOF) point is set at the beginning of the specified sector (see Random Access Method).
If {record} is negative, the End Of File (EOF) point is set to the current position in the file.
File space beyond the location of the EOF point is released to the system. If the new EOF is set before the current EOF, data beyond the new EOF is lost.
See Also: Example Code, READ (FILE), WRITE (FILE), WRITAB (FILE), Disk I/O Instructions
![]() |