INFILE
operand <options> ;
The INFILE statement opens an external file for input or, if the file is already open, makes it the current input file. A subsequent INPUT statement reads from the specified file.
The arguments to the INFILE statement are as follows:
is either a predefined filename or a quoted string that contains in parentheses the filename or character expression that refers to the pathname.
are explained in the following list.
The valid values for the options argument are as follows:
The following keywords control how a program behaves when an INPUT statement tries to read past the end of a record. The default behavior is STOPOVER.
Several examples of INFILE statements follow:
filename in1 "student.dat"; /* specify filename IN1 */ infile in1; /* infile pathname */ infile "student.dat"; /* path by quoted literal */ infile "student.dat" missover; /* use missover option */
See Chapter 8 for further information.