Overview (END FILE command)
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.
Basic Specification
The basic specification is simply END
FILE. There are no additional specifications. The end of file
is defined according to the conditions specified for END
FILE in the input program.
Syntax Rules
-
END FILEis available only within anINPUT PROGRAMstructure. - Only one
END FILEcommand can be executed per input program. However, multipleEND FILEcommands can be specified within a conditional structure in the input program.
Operations
- When
END FILEis encountered, the program stops reading data and puts an end of file in the active dataset it was building. The case that causes the execution ofEND FILEis not read. To include this case, use theEND CASEcommand beforeEND FILE(see the examples below). -
END FILEhas the same effect as the end of the input data file. It terminates the input program (seeINPUT PROGRAM—END INPUT PROGRAM).