In the context of file I/O that does not involve databases, the EGL open statement opens the file that is associated with a given record variable.
| Statement present in the program | File status |
|---|---|
| EGL get statements only | Open for input |
| EGL add statements only | Open for output |
| Both EGL get and add statements | Open for both input and output |

The following example shows how to clear a file:
open file for myRecordVariable;
if (0 == 1)
add myRecordVariable;
end
close myRecordVariable;