Go BackSAS: Data Manipulation

Synopsis
SAS: Data Manipulation describes optional SAS statements used to modify data so that more complex data analysis tasks can be performed.

Audience
This course is for end users, programmers and business professionals who have an introductory level of experience with SAS.

Time
4 - 8 hours

Product Code: SAS103
After completing this course, the student should be able to:
 
Select variables for the output data set
Use an assignment statement to create variables
Code SAS expressions
Work with dates
Process selected observations
Create subsets of observations
Analyze SAS logs with problems

SAS Review
Reviews basic SAS and course conventions.
 
Course Program

Basic SAS program used as the course example.  The FILE and INCLUDE commands in Display Manager to store and access a program.  Rules for coding SAS.  Syntax and screen design conventions used in the SAS series.

Variables
Describes the program data vector (PDV).  Explains how to select variables in the PDV for placement in the output data set.  Describes how to create variables.
 
Variables in the PDV

What a program data vector is.  How it is created.  The role the PDV plays during the compile and execution of the DATA step.
 
Reading Selected Variables

Using the KEEP or DROP statements to select and/or exclude variables.
 
Creating Variables

Using an assignment statement to create variables.

SAS Expressions
Explains how to write a sequence of operands and operators that form a set of instructions to produce a value.
 
Using Expressions in Assignment Statements

Use of operands and operators in SAS expressions.  Types and characteristics of SAS constants.  Arithmetic, comparison and logic operators.  Order of evaluation.

Dates
Explains how to work with dates in SAS.
 
Working with Dates

How SAS represents date and time values.  Functions to read in dates.  Formats to display dates.

Observations
Describes how to process selected observations and how to create subsets of observations.
 
Processing Selected Observations

Why and how IF statements are used.  When THEN and ELSE statements execute.  Coding IF statements to test for missing values and to compare dates.
 
Creating Subsets of Observations

Using the DELETE statement to delete observations.  Using the subsetting IF statement or the WHERE statement to select observations.  Using the OUTPUT statement to write observations to multiple output data sets.

What Ifs
Gives practice in analyzing SAS logs to find and correct errors in the SAS program.
 
Analyzing SAS Logs with Problems

Logs showing results of incorrectly coded SAS statements and omitted parameters.

 

Go Back