Lecture 5 Understanding Data Step Programming - and Numeric Variables - Chap 6-7 StepByStepSASProg
Lecture 5 Understanding Data Step Programming - and Numeric Variables - Chap 6-7 StepByStepSASProg
Understanding Data
step programming
You will learn:
You can find the programs used in these examples and the
data at the link given below:
https://documentation.sas.com/?docsetId=basess&docsetTarget=titlepage.
htm&docsetVersion=9.4&locale=en
You can also Google the name of the book and choose a link that
provides online documentation
Input data used for examples
missing value
Assignment statement
Consider below how a new variable is created and assigned the value of a
mathematical expression
Data Tours1;
Run;
New variable Expression
created
Adding information to some observations but
not others
The use of IF-THEN-ELSE conditions
Note that for 1st and 3rd observtions ‘BonusPoints’ variable has missing value
Making uniform changes to data without
creating new variables
LENGTH statement
1st assignment statement
Conditionally deleting observations
Working with
Numeric Variables
Chapter 7
Numeric variables
Creating new variables By arithmetic expressions
Understanding how SAS handles missing values
Propagating missing values
Rounding Values