Chapter 2 Creating SAS Data Sets

Your first step in using SAS to summarize and analyze data is to create a SAS data set. If your data is in a spreadsheet or other type of file, see Chapter 3, “Importing Data.” This chapter discusses the following topics:

  • understanding features of SAS data sets
  • creating a SAS data set
  • printing a data set
  • sorting a data set

The “Special Topics” section discusses the following tasks:

  • adding labels to variable names
  • adding labels to values of variables

What Is a SAS Data Set?

Understanding the SAS DATA Step

Summarizing the SAS DATA Step

Assigning Names

Task 1: The DATA Statement

Task 2: The INPUT Statement

Task 3: The DATALINES Statement

Task 4: The Data Lines

Task 5: The Null Statement

Task 6: The RUN Statement ...

Get Elementary Statistics Using SAS 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.