MISSOVER
prevents an INPUT statement from reading a new input data record if it does not find values in the current input line for all the variables in the statement. When an INPUT statement reaches the end of the current input data record, variables without any values assigned are set to missing.
Use MISSOVER if the last field(s) may be missing and you want SAS to assign missing values to
the corresponding variable.
TRUNCOVER
overrides the default behavior of the INPUT statement when an input data record is shorter than the INPUT statement expects. By default, the INPUT statement automatically reads the next input data record. TRUNCOVER enables you to read variable-length records when some records are shorter than the INPUT statement expects. Variables without any values assigned are set to missing.
Use TRUNCOVER to assign the contents of the input buffer to a variable when the field is shorter than expected.
Example: MISSOVER
filename mmm 'c:\sas_class\classdata\stocks_missover.txt';
* No missover option, only 13 rows read into the sas data.;
data stocks;
infile mmm;
input ticker $ price industry $;
run;
filename mov 'c:\sas_class\classdata\stocks_missover.txt';
* With missover option, all rows are read into the sas data.;
data stocks;
infile mov missover;
input ticker $ price industry $;
run;
Example: TRUNCOVER
* Read text file into sas dataset without truncover;
data temp;
infile 'c:\sas_class\classdata\truncover_effect.txt' ;
input line $ 1-256 ;
run;
proc print data=temp;
run;
* Read text file into sas dataset with truncover;
data temp;
infile 'c:\sas_class\classdata\truncover_effect.txt' truncover;
input line $ 1-256 ;
run;
proc print data=temp; run;
|