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.

This course can help prepare you for the following certification exam(s): SAS Advanced Programming Exam for SAS 9.

Learn how to compare various SAS programming techniques that enable you to

  • 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.


This course is not appropriate for beginning SAS software users. Before attending this course, you should have at least nine months of SAS programming experience and should have completed the SAS Programming 2: Data Manipulation Techniques course. Specifically, you should be able to do the following:

  • understand your operating system file structures and perform basic operating system tasks
  • understand programming logic concepts
  • understand the compilation and execution processes of the DATA step
  • use different varieties of input to create SAS data sets from external files
  • use SAS software to access SAS libraries
  • create and use SAS date values
  • read, concatenate, merge, match-merge, and interleave SAS data sets
  • use the DROP=, KEEP=, and RENAME= data set options
  • create multiple output data sets
  • use one-dimensional array processing and DO loops to process data iteratively
  • use SAS functions to perform data manipulation and transformations
  • use the FORMAT procedure to create user-defined formats.

Course Outline


  • course logistics
  • creating course data files

Efficient SAS Programming 

  • identifying computer resources related to efficiency

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

Accessing Observations 

  • access methods
  • accessing observations by number
  • creating an index
  • using an index

DATA Step Arrays 

  • introduction to lookup techniques
  • one-dimensional arrays
  • multidimensional arrays
  • loading a multidimensional array from a SAS data set

DATA Step Hash and Hiter Objects 

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

Combining Data Horizontally 

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

User-Defined Functions and Formats 

  • user-defined functions
  • user-defined formats

Learning More 

  • areas of support from SAS
  • other courses to consider