O'Reilly logo

SAS Essentials: Mastering SAS for Data Analytics, 2nd Edition by Wayne A. Woodward, Alan C. Elliott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2GETTING DATA INTO SAS®

Before you can perform any analysis, you must have data. SAS contains powerful tools you can use to enter, import, and manage your data. This chapter introduces the most commonly used methods for getting data into SAS. Additional techniques are covered in Chapter 3.

The main way to enter and manipulate data in SAS is by using the SAS DATA step. This DATA step creates a specially formatted type of file referred to as a “SAS data set” or “SAS data file.” A SAS data set contains the raw data plus other information. It contains variable names, how data values are read and interpreted, how values are displayed in output, labels associated with the variable names, and other information.

Entering and manipulating data are the primary topics of the following several chapters. In the initial SAS examples, you may have noted that the programs begin with the keyword DATA, followed by lines of code defining the data for analysis. As noted in Chapter 1, this is called the DATA step. Within the DATA step, data are manipulated, cleaned, and otherwise prepared for analysis. Depending on how carefully the data have been collected and entered, this process can be quick and simple or long and detailed. Either way, the DATA step is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required