SAS Programming 3: Advanced Techniques and Efficiencies



This course is for SAS programmers who prepare data for analysis. The comparisons of manipulation techniques and resource cost benefits are designed to help programmers choose the most appropriate technique for their data situation.


Experienced SAS programmers


  • At least nine months of SAS programming experience

Learning Objectives

  • Compare various SAS programming techniques
  • Benchmark computer resource usage
  • Control memory, I/O, and CPU resources
  • Create and use indexes
  • Combine data horizontally
  • Use hash and hiter DATA step component objects and arrays as lookup tables
  • Compress SAS data sets
  • Sample your SAS data sets
  • Create and use SAS data views
  • Safely reduce the length of numeric variables
  • Create user-defined functions and informats

1. Introduction

  • Course logistics
  • Creating course data files

2. Efficient SAS Programming

  • Identifying computer resources related to efficiency

3. Controlling I/O Processing and Memory

  • SAS DATA step processing
  • Controlling I/O
  • Reducing the length of numeric variables
  • Compressing SAS data sets
  • Using SAS views

4. Accessing Observations

  • Access methods
  • Accessing observations by number
  • Creating an index
  • Using an index

5. DATA Step Arrays

  • Introduction to lookup techniques
  • One-dimensional arrays
  • Multidimensional arrays
  • Loading a multidimensional array from a SAS data set

6. DATA Step Hash and Hiter Objects

  • Hash object methods
  • Loading a hash object from a SAS data set
  • DATA step hiter object

7. Combining Data Horizontally

  • DATA step merges and SQL procedure joins
  • Using an index to combine data
  • Combining summary and detail data
  • Combining data conditionally

8. User-Defined Functions and Formats

  • User-defined functions
  • User-defined formats

9. Learning More

  • Areas of support from SAS
  • Other courses to consider