Working with other file formats
Up to now, in this chapter, we have talked about reading in SAS datasets in either XPT or *.SAS7bdat
format. Now, we will examine reading in data from non-SAS formats:
We will start by revisiting the
infile
statement, and examine options that can be set to help read in non-SAS data.Next, we will practice using the
infile
statement to read a*.csv
file and a*.txt
file into SAS.After this, we will examine
PROC IMPORT
, and experiment with how it can help us read in data without having us type a lengthyinfile
statement.Finally, we will discuss converting non-SAS data to SAS format for physical storage.
This section will provide an overview of approaches the analyst can take when reading data from non-SAS formats into SAS, and provide several examples.
Reading non-SAS data formats
With respect to the size of data files, you may have noticed that of the three formats for the Chap2_1_SAS
, Chap2_1_XPT
, and Chap2_1_CSV
datasets...