The at end condition can occur after an OPEN DOCUMENT or READ statement has been executed.
How execution continues after the input/output statement has been executed depends on the I-O status displayed. The table below shows how/where the program run is continued in each case. ’-’ stands for specifications which are not relevant for selecting the type of continuation.
I-O status after the statement indicates | AT END | NOT AT END | USE procedure | |||
Specified | Not specified | Specified | Not specified | Declared | Not declared | |
successful | - | - | imperative-statement-2 | End of the statement | - | - |
at end condition | imperative-statement-1 | Continuation as in 'USE procedure' column for other error condition | - | - | - | - |
other error condition | - | - | - | - | use-procedure | Program abortion |
imperative-statement-1, imperative-statement-2 and use-procedure are executed in accordance with the rules for the statements specified there. Depending on the type of statement, the program run is either continued in another part of the program or at the end of the input/output statement.