SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

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:

  • reference the external text file to be read
  • name the SAS data set
  • identify the external file
  • describe the data values to be read.

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 libraryLIBNAME statement
Reference external fileFILENAME statement
Name SAS data setDATA statement
Identify external fileINFILE statement
Describe DataINPUT statement
Execute DATA StepRUN statement
List the dataPROC PRINT statement
Execute final program stepRUN statement



back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement