If your dataset is large (more than 100 observations or more than 10 variables), you will most likely want SAS to read your data directly from an external file in which you have it saved. This is easily done if your data are in an Excel spreadhseet.
SAS statements to read the data from an Excel file:
SAS needs to be told two things: a SAS name for the dataset, and the name of the external Excel file. These are accomplished with one SAS statement:
The PROC IMPORT statement has two options:
SAS statements always start with a keyword and end with a semicolon.
In addition, use the REPLACE option to assure that SAS overwrites pre-existing versions of your dataset. Each time you run PROC IMPORT, it will attempt to create the requested dataset. If you do not specify REPLACE, it will not create a new dataset (i.e., it will leave the old copy active). This can cause great confusion, as you correct your dataset and SAS appears to ignore the changes (because the old copy is still being used).
\\\2 or 3 Examples (snagits)