END=variable
specifies a variable that SAS sets to 1 when the current input data record is the last in the input file. Until SAS processes the last data record, the END= variable is set to 0. Like automatic variables, this variable is not written to the data set.
Restriction:You cannot use the END= option with the UNBUFFERED option, the DATALINES or DATALINES4 statement, or an INPUT statement that reads multiple input data records.
Tip:Use the option EOF= when END= is invalid.
Example:Reading from Multiple Input Files
EOF=label
specifies a statement label that is the object of an implicit GO TO when the INFILE statement reaches end of file. When an INPUT statement attempts to read from a file that has no more records, SAS moves execution to the statement label indicated.
Interaction:Use EOF= instead of the END= option with the UNBUFFERED option, the DATALINES or DATALINES4 statement, an INPUT statement that reads multiple input data records.
Tip:The EOF= option is useful when you read from multiple input files sequentially.
See:END=, EOV=, and UNBUFFERED
EOV=variable
specifies a variable that SAS sets to 1 when the first record in a file in a series of concatenated files is read. The variable is set only after SAS encounters the next file. Like automatic variables, the EOV= variable is not written to the data set.
Tip:Reset the EOV= variable back to 0 after SAS encounters each boundary.
See:END= and EOF=
EXPANDTABS | NOEXPANDTABS
结合示例看,更有体会
|