Creating a SAS Data Set from a Raw Data File

To read the raw data file, SAS must receive the following information in the DATA step:
  • the location or name of the external text file
  • a name for the new SAS data set
  • a reference that identifies the external file
  • a description of the data values to be read
After using the DATA step to read the raw data, you can use a PROC PRINT step to produce a report that displays the data values that are in the new data set.
The table below outlines the basic statements that are used in a program that reads raw data in fixed fields.
Table 6.2 Statements for Reading Raw Data
Task
SAS Statement
Reference a SAS library
LIBNAME statement
Reference an external file
FILENAME ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.