|
|
|
||||
|
|
|||||
***** FIRST EXAMPLE ****** ;
filename in ("c:\mydata\winners1.txt","c:\mydata\winners2.txt");
data mydata;
infile in ;
input a b c d;
run;
* use proc print to verify that all the data files were read;
proc print data=mydata;
var year;
run;
***** SECOND EXAMPLE ****** ;
* this example makes a variable "filenum" which contains the number for the ;
* file the data came from. ;
filename in ("c:\mydata\winners1.txt","c:\mydata\winners2.txt");
data test;
infile in eov=newfile;
input a b c d;
retain filenum 1;
if newfile then do;
newfile=0;
filenum+1;
end;
run;
* use proc print to verify that all the data files were read; proc print data=mydata; var year; run;
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services