END FILE
END FILE
is used in an INPUT PROGRAM—END INPUT PROGRAM
structure
to tell the program to stop reading data before it actually encounters the end of the file.
END FILE
can be used with END CASE
to concatenate raw data files
by causing the program to delay end-of-file processing until it has read multiple data files.
END FILE
can also be used with LOOP
and END CASE
to generate data without any data input.
END FILE
Example
INPUT PROGRAM.
DATA LIST FILE=PRICES /YEAR 1-4 QUARTER 6 PRICE 8-12(2).
DO IF (YEAR GE 1881). /*Stop reading before 1881
END FILE.
END IF.
END INPUT PROGRAM.