Definition of Reading Raw Data
raw data
is unprocessed data that has not been read into a SAS data set. You can use a DATA
step to read raw data into a SAS data set from two sources:
instream data
an external file
Note: Raw data does not include Database Management System (DBMS) files. You
must license SAS/ACCESS software to access data stored in DBMS files. For more
information about SAS/ACCESS features, see Chapter 33, “About SAS/ACCESS
Software,” on page 709.
Ways to Read Raw Data
You can read raw data by using one of the following items:
SAS statements
SAS functions
External File Interface (EFI)
Import Wizard
When you read raw data with a DATA step, you can use a combination of the INPUT,
DATALINES, and INFILE statements. SAS automatically reads your data when you use
these statements. For more information about these statements, see “Reading Raw Data
with the INPUT Statement” on page 445.
You can also use SAS functions to manipulate external files and to read records of raw
data. These functions provide more flexibility in handling raw data. For a description of
available functions, see the SAS File I/O and External File categories in “SAS Functions
and CALL Routines by Category” in SAS Functions and CALL Routines: Reference. For
more information about how statements and functions manipulate files differently, see
“Using Functions to Manipulate Files” in SAS Functions and CALL Routines: Reference.
If your operating environment supports a graphical user interface, you can use the EFI or
the Import Wizard to read raw data. The EFI is a point-and-click graphical interface that
you can use to read and write data that is not in SAS software's internal format. By using
EFI, you can read data from an external file and write it to a SAS data set. You can also
read data from a SAS data set and write it to an external file. See SAS/ACCESS Interface
to PC Files: Reference for more information about EFI.
Note: If the data file that you are passing to EFI is password protected, you are
prompted multiple times for your login ID and password.
The Import Wizard guides you through the steps to read data from an external data
source and write it to a SAS data set. As a wizard, it is a series of windows that present
simple choices to guide you through a process. See SAS/ACCESS Interface to PC Files:
Reference for more information about the wizard.
Operating Environment Information
440 Chapter 21 Reading Raw Data

Get SAS 9.4 Language Reference, 6th 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.