WEOF


ANSI

 

The WEOF instruction establishes the End Of File (EOF) point at the position indicated. The instruction uses the following format:

 

 

[label]

WEOF

{file},{record}

 

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:

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

  2. If {record} is negative, the End Of File (EOF) point is set to the current position in the file.

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

 



PL/B Language Reference UPDATE, UPDATAB (IFILE) WRITAB