SAS Programming 2: Data Manipulation Techniques

This course is for those who need to learn data manipulation techniques using SAS DATA and procedure steps to access, transform, and summarize SAS data sets. The course builds on the concepts that are presented in the SAS Programming 1: Essentials course and is not recommended for beginning SAS software users.

This course can help prepare you for the following certification exam(s): SAS Base Programming Exam for SAS 9, SAS Certified Clinical Trials Programmer Using SAS 9.

Learn how to

  • control SAS data set input and output
  • combine SAS data sets
  • summarize, read, and write different types of data
  • perform DO loop and SAS array processing
  • transform character, numeric, and date variables.


Before attending this course, you should have at least six months of experience writing SAS programs or have completed the SAS Programming 1: Essentials course and used SAS for at least one month. Specifically, you should be able to

  • bmit a SAS program
  • diagnose and correct syntax errors
  • examine descriptor and data portions of a SAS data set
  • access SAS data libraries
  • read and create SAS data sets
  • read Excel spreadsheets
  • read delimited raw data files
  • examine data errors when reading raw data files
  • use SAS procedures to validate data
  • clean invalid data
  • create variables
  • combine SAS data sets
  • use global statements
  • use labels and formats, including user-defined formats
  • subset observations
  • produce summary reports using the FREQ and MEANS procedures.

Course Outline


  • course logistics
  • creating course data files

Controlling Input and Output 

  • writing observations explicitly
  • writing to multiple SAS data sets
  • selecting variables and observations

Summarizing Data 

  • creating an accumulating total variable
  • accumulating totals for a group of data

Reading Raw Data Files 

  • reading raw data files with formatted input
  • controlling when a record loads

Data Transformations 

  • manipulating character values
  • manipulating numeric values
  • converting variable type

Debugging Techniques 

  • using the PUTLOG statement

Processing Data Iteratively 

  • DO loop processing
  • conditional DO loop processing
  • SAS array processing
  • using SAS arrays

Restructuring a Data Set 

  • rotating with the DATA step

Combining SAS Data Sets 

  • using data manipulation techniques with match-merging

Creating and Maintaining Permanent Formats 

  • creating permanent formats

Other SAS Languages 

  • an overview of other languages
  • using the SQL procedure
  • the SAS macro language

Learning More 

  • SAS resources
  • next steps