09-08-2015 10:06 AM
INFILE is used to denote an external file from whcih data is read into the SAS system.
FILE denotes an external file that data is written to.
Basic DATA step architecture:
09-08-2015 11:03 AM
Hi ... you can try this ...
* create a data file (no data set created);
* specify the name of the data file;
* create some numeric variables and give them all a value of 99;
retain x1 x2 x3 99;
* write the values of the variables to the file specified in the FILE statement;
* read the data file you just created and create a data set;
* specify the location of the data file;
* read the data;
* look at your data set;
proc print data=new;
Another way to remember the difference between FILE and INFILE is to think of the statements PUT and INPUT. PUT statements are associated with FILE (write to a file) and INPUT statements are associated with INFILE (read data from an already existing file).