Reading Raw Data |
Steps to Create a SAS Data
Set |
Before reading the raw data from the file, you must first
reference the SAS data library where you will store the data set. Then you
can write a DATA step program to read the raw data file and create a SAS
data set.
To read the raw data file, the DATA step must give the following instructions to the SAS System:
After the raw data is read using the DATA step, you can use a PROC PRINT step to produce a list report that contains the data values that are in the new data set. For more information on PROC PRINT, see the lesson Producing List Reports. The table below outlines the statements that you'll use to construct your program. Throughout this lesson, you'll see similar tables that show sample SAS statements for reading raw data in fixed fields. |
To do this... | Use this SAS statement... |
Reference SAS data library | LIBNAME statement |
Reference external file | FILENAME statement |
Name SAS data set | DATA statement |
Identify external file | INFILE statement |
Describe Data | INPUT statement |
Execute DATA Step | RUN statement |
List the data | PROC PRINT statement |
Execute final program step | RUN statement |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.