%EOF Function

%EOF built-in function returns True if the most recent read operation or write to a subfile ended in an end of file or beginning of file condition; otherwise, it returns False .

%EOF  {(File_name)}

Parameters

File_name

Optional. The name of the file. %EOF is only available if the file name is specified for primary and secondary files.

Remarks

The operations that set %EOF are:

  • READ (Read a Record)
  • READC (Read Next Changed Record)
  • READE (Read Equal Key)
  • READP (Read Prior Record)
  • READPE (Read Prior Equal)
  • WRITE (Create New Records - subfile only)

When a full-procedural file is specified, this function returns True if the previous operation in the list above, for the specified file, resulted in an end of file or beginning of file condition.

This function is allowed for input and update files, and for display files allowing WRITE to subfile records.

See Also

Built-in Function Overview
READ
READC
READE
READP
READPE
WRITE
IsEof Property