• Contents
  • About
  • Introduction to the SAS System
    • What Is the SAS System?
      • Introduction to the SAS System
      • Components of Base SAS Software
      • Output Produced by the SAS System
      • Ways to Run SAS Programs
      • Running Programs in the SAS Windowing Environment
      • Review of SAS Tools
      • Learning More
  • Getting Your Data into Shape
    • Introduction to DATA Step Processing
      • Introduction to DATA Step Processing
      • The SAS Data Set: Your Key to the SAS System
      • How the DATA Step Works: A Basic Introduction
      • Supplying Information to Create a SAS Data Set
      • Review of SAS Tools
      • Learning More
    • Starting with Raw Data: The Basics
      • Introduction to Raw Data
      • Examine the Structure of the Raw Data: Factors to Consider
      • Reading Unaligned Data
      • Reading Data That Is Aligned in Columns
      • Reading Data That Requires Special Instructions
      • Reading Unaligned Data with More Flexibility
      • Mixing Styles of Input
      • Review of SAS Tools
      • Learning More
    • Starting with Raw Data: Beyond the Basics
      • Introduction to Beyond the Basics with Raw Data
      • Testing a Condition before Creating an Observation
      • Creating Multiple Observations from a Single Record
      • Reading Multiple Records to Create a Single Observation
      • Problem Solving: When an Input Record Unexpectedly Does Not Have Enough Values
      • Review of SAS Tools
      • Learning More
    • Starting with SAS Data Sets
      • Introduction to Starting with SAS Data Sets
      • Understanding the Basics
      • Input SAS Data Set for Examples
      • Reading Selected Observations
      • Reading Selected Variables
      • Creating More Than One Data Set in a Single DATA Step
      • Using the DROP= and KEEP= Data Set Options for Efficiency
      • Review of SAS Tools
      • Learning More
  • Basic Programming
    • Understanding DATA Step Processing
      • Introduction to DATA Step Processing
      • Input SAS Data Set for Examples
      • Adding Information to a SAS Data Set
      • Defining Enough Storage Space for Variables
      • Conditionally Deleting an Observation
      • Review of SAS Tools
      • Learning More
    • Working with Numeric Variables
      • Introduction to Working with Numeric Variables
      • About Numeric Variables in SAS
      • Input SAS Data Set for Examples
      • Calculating with Numeric Variables
      • Comparing Numeric Variables
      • Storing Numeric Variables Efficiently
      • Review of SAS Tools
      • Learning More
    • Working with Character Variables
      • Introduction to Working with Character Variables
      • Input SAS Data Set for Examples
      • Identifying Character Variables and Expressing Character Values
      • Setting the Length of Character Variables
      • Handling Missing Values
      • Creating New Character Values
      • Saving Storage Space by Treating Numbers as Characters
      • Review of SAS Tools
      • Learning More
    • Acting on Selected Observations
      • Introduction to Acting on Selected Observations
      • Input SAS Data Set for Examples
      • Selecting Observations
      • Constructing Conditions
      • Comparing Characters
      • Review of SAS Tools
      • Learning More
    • Creating Subsets of Observations
      • Introduction to Creating Subsets of Observations
      • Input SAS Data Set for Examples
      • Selecting Observations for a New SAS Data Set
      • Conditionally Writing Observations to One or More SAS Data Sets
      • Review of SAS Tools
      • Learning More
    • Working with Grouped or Sorted Observations
      • Introduction to Working with Grouped or Sorted Observations
      • Input SAS Data Set for Examples
      • Working with Grouped Data
      • Working with Sorted Data
      • Review of SAS Tools
      • Learning More
    • Using More Than One Observation in a Calculation
      • Introduction to Using More Than One Observation in a Calculation
      • Input File and SAS Data Set for Examples
      • Accumulating a Total for an Entire Data Set
      • Obtaining a Total for Each BY Group
      • Writing to Separate Data Sets
      • Using a Value in a Later Observation
      • Review of SAS Tools
      • Learning More
    • Finding Shortcuts in Programming
      • Introduction to Shortcuts
      • Input File and SAS Data Set
      • Performing More Than One Action in an IF-THEN Statement
      • Performing the Same Action for a Series of Variables
      • Review of SAS Tools
      • Learning More
    • Working with Dates in the SAS System
      • Introduction to Working with Dates
      • Understanding How SAS Handles Dates
      • Input File and SAS Data Set for Examples
      • Entering Dates
      • Displaying Dates
      • Using Dates in Calculations
      • Using SAS Date Functions
      • Comparing Durations and SAS Date Values
      • Review of SAS Tools
      • Learning More
  • Combining SAS Data Sets
    • Methods of Combining SAS Data Sets
      • Introduction to Combining SAS Data Sets
      • Definition of Concatenating
      • Definition of Interleaving
      • Definition of Merging
      • Definition of Updating
      • Definition of Modifying
      • Comparing Modifying, Merging, and Updating Data Sets
      • Learning More
    • Concatenating SAS Data Sets
      • Introduction to Concatenating SAS Data Sets
      • Concatenating Data Sets with the SET Statement
      • Concatenating Data Sets Using the APPEND Procedure
      • Choosing between the SET Statement and the APPEND Procedure
      • Review of SAS Tools
      • Learning More
    • Interleaving SAS Data Sets
      • Introduction to Interleaving SAS Data Sets
      • Understanding BY-Group Processing Concepts
      • Interleaving Data Sets
      • Review of SAS Tools
      • Learning More
    • Merging SAS Data Sets
      • Introduction to Merging SAS Data Sets
      • Understanding the MERGE Statement
      • One-to-One Merging
      • Match-Merging
      • Choosing between One-to-One Merging and Match-Merging
      • Review of SAS Tools
      • Learning More
    • Updating SAS Data Sets
      • Introduction to Updating SAS Data Sets
      • Understanding the UPDATE Statement
      • Understanding How to Select BY Variables
      • Updating a Data Set
      • Updating with Incremental Values
      • Understanding the Differences between Updating and Merging
      • Handling Missing Values
      • Review of SAS Tools
      • Learning More
    • Modifying SAS Data Sets
      • Introduction
      • Input SAS Data Set for Examples
      • Modifying a SAS Data Set: The Simplest Case
      • Modifying a Master Data Set with Observations from a Transaction Data Set
      • Understanding How Duplicate BY Variables Affect File Update
      • Handling Missing Values
      • Review of SAS Tools
      • Learning More
    • Conditionally Processing Observations from Multiple SAS Data Sets
      • Introduction to Conditional Processing from Multiple SAS Data Sets
      • Input SAS Data Sets for Examples
      • Determining Which Data Set Contributed the Observation
      • Combining Selected Observations
      • Performing a Calculation Based on the Last Observation
      • Review of SAS Tools
      • Learning More
  • Understanding Your SAS Session
    • Analyzing Your SAS Session with the SAS Log
      • Introduction to Analyzing Your SAS Session with the SAS Log
      • Understanding the SAS Log
      • Locating the SAS Log
      • Understanding the Log Structure
      • Writing to the SAS Log
      • Suppressing Information to the SAS Log
      • Changing the Log's Appearance
      • Review of SAS Tools
      • Learning More
    • Directing SAS Output and the SAS Log
      • Introduction to Directing SAS Output and the SAS Log
      • Input File and SAS Data Set for Examples
      • Routing the Output and the SAS Log with PROC PRINTTO
      • Storing the Output and the SAS Log in the SAS Windowing Environment
      • Redefining the Default Destination in a Batch or Noninteractive Environment
      • Review of SAS Tools
      • Learning More
    • Diagnosing and Avoiding Errors
      • Introduction to Diagnosing and Avoiding Errors
      • Understanding How the SAS Supervisor Checks a Job
      • Understanding How SAS Processes Errors
      • Distinguishing Types of Errors
      • Diagnosing Errors
      • Using a Quality Control Checklist
      • Learning More
  • Producing Reports
    • Producing Detail Reports with the PRINT Procedure
      • Introduction to Producing Detail Reports with the PRINT Procedure
      • Input File and SAS Data Sets for Examples
      • Creating Simple Reports
      • Creating Enhanced Reports
      • Creating Customized Reports
      • Making Your Reports Easy to Change
      • Review of SAS Tools
      • Learning More
    • Creating Summary Tables with the TABULATE Procedure
      • Introduction to Creating Summary Tables with the TABULATE Procedure
      • Understanding Summary Table Design
      • Understanding the Basics of the TABULATE Procedure
      • Input File and SAS Data Set for Examples
      • Creating Simple Summary Tables
      • Creating More Sophisticated Summary Tables
      • Review of SAS Tools
      • Learning More
    • Creating Detail and Summary Reports with the REPORT Procedure
      • Introduction to Creating Detail and Summary Reports with the REPORT Procedure
      • Understanding How to Construct a Report
      • Input File and SAS Data Set for Examples
      • Creating Simple Reports
      • Creating More Sophisticated Reports
      • Review of SAS Tools
      • Learning More
  • Producing Plots and Charts
    • Plotting the Relationship between Variables
      • Introduction to Plotting the Relationship between Variables
      • Input File and SAS Data Set for Examples
      • Plotting One Set of Variables
      • Enhancing the Plot
      • Plotting Multiple Sets of Variables
      • Review of SAS Tools
      • Learning More
    • Producing Charts to Summarize Variables
      • Introduction to Producing Charts to Summarize Variables
      • Understanding the Charting Tools
      • Input File and SAS Data Set for Examples
      • Charting Frequencies with the CHART Procedure
      • Customizing Frequency Charts
      • Creating High-Resolution Histograms
      • Review of SAS Tools
      • Learning More
  • Designing Your Own Output
    • Writing Lines to the SAS Log or to an Output File
      • Introduction to Writing Lines to the SAS Log or to an Output File
      • Understanding the PUT Statement
      • Writing Output without Creating a Data Set
      • Writing Simple Text
      • Writing a Report
      • Review of SAS Tools
      • Learning More
    • Understanding and Customizing SAS Output: The Basics
      • Introduction to the Basics of Understanding and Customizing SAS Output
      • Understanding Output
      • Input SAS Data Set for Examples
      • Locating Procedure Output
      • Making Output Informative
      • Controlling Output Appearance
      • Controlling the Appearance of Pages
      • Representing Missing Values
      • Review of SAS Tools
      • Learning More
    • Customizing SAS Output: The Output Delivery System (ODS)
      • Introduction to Customizing SAS Output by Using the Output Delivery System
      • Input Data Set for Examples
      • Understanding ODS Output Formats and Destinations
      • Selecting an Output Format
      • Creating Formatted Output
      • Selecting the Output That You Want to Format
      • Customizing ODS Output
      • Storing Links to ODS Output
      • Review of SAS Tools
      • Learning More
  • Storing and Managing Data in SAS Files
    • Understanding SAS Data Libraries
      • Introduction to Understanding SAS Data Libraries
      • What Is a SAS Data Library?
      • Accessing a SAS Data Library
      • Storing Files in a SAS Data Library
      • Referencing SAS Data Sets in a SAS Data Library
      • Review of SAS Tools
      • Learning More
    • Managing SAS Data Libraries
      • Introduction
      • Choosing Your Tools
      • Understanding the DATASETS Procedure
      • Looking at a PROC DATASETS Session
      • Review of SAS Tools
      • Learning More
    • Getting Information about Your SAS Data Sets
      • Introduction to Getting Information about Your SAS Data Sets
      • Input Data Library for Examples
      • Requesting a Directory Listing for a SAS Data Library
      • Requesting Contents Information about SAS Data Sets
      • Requesting Contents Information in Different Formats
      • Review of SAS Tools
      • Learning More
    • Modifying SAS Data Set Names and Variable Attributes
      • Introduction to Modifying SAS Data Set Names and Variable Attributes
      • Input Data Library for Examples
      • Renaming SAS Data Sets
      • Modifying Variable Attributes
      • Review of SAS Tools
      • Learning More
    • Copying, Moving, and Deleting SAS Data Sets
      • Introduction to Copying, Moving, and Deleting SAS Data Sets
      • Input Data Libraries for Examples
      • Copying SAS Data Sets
      • Copying Specific SAS Data Sets
      • Moving SAS Data Libraries and SAS Data Sets
      • Deleting SAS Data Sets
      • Deleting All Files in a SAS Data Library
      • Review of SAS Tools
      • Learning More
  • Understanding Your SAS Environment
    • Introducing the SAS Environment
      • Introduction to the SAS Environment
      • Starting a SAS Session
      • Selecting a SAS Processing Mode
      • Review of SAS Tools
      • Learning More
    • Using the SAS Windowing Environment
      • Introduction to Using the SAS Windowing Environment
      • Getting Organized
      • Finding Online Help
      • Using SAS Windowing Environment Command Types
      • Working with SAS Windows
      • Working with Text
      • Working with Files
      • Working with SAS Programs
      • Working with Output
      • Review of SAS Tools
      • Learning More
    • Customizing the SAS Environment
      • Introduction to Customizing the SAS Environment
      • Customizing Your Current Session
      • Customizing Session-to-Session Settings
      • Customizing the SAS Windowing Environment
      • Review of SAS Tools
      • Learning More
  • Appendix
    • Additional Data Sets
      • Introduction
      • Data Set CITY
      • Raw Data Used for the Understanding Your SAS Session Section
      • Data Set SAT_SCORES
      • Data Set YEAR_SALES
      • Data Set HIGHLOW
      • Data Set GRADES
      • Data Sets for the Storing and Managing Data in SAS Files Section
  • Glossary


ProductRelease
Base SAS9.3
9.2
9.1.3
9.1.2
9.1
9.0
8.2
8.01
8.0
Type
Usage and Reference
Copyright Date
May 2001
Last Updated
05Jul2011