In this tutorial, SAS user Arthur Li addresses a common issue encountered by new SAS® programmers: that the SAS data set that they create is not what they intended to create. These types of mistakes are most commonly committed, he says, because programming novices learn SAS language syntax without understanding the fundamental SAS programming concepts.
You'll learn how DATA step programming operates in three parts:
0:00:00 – Overview and outline
0:00:45 – Understanding how the DATA Step works
0:11:09 – Importance of the OUTPUT Statement
0:12:29 – Differences in a Raw Data Set and a SAS Data Set
0:16:12 – RETAIN statement values
0:21:30 – SUM Statement
0:22:50 – IF Statement
0:23:50 – END=Option
0:30:05 – By-group processing method
0:42:00 – Duplicate or Non-duplicate observations
0:51:27 – Restructuring Data sets from Long to Wide Format
0:58:53 – Writing loops in the DATA Step
1:00:39 – Implicit Loops
1:03:17 – Explicit Loops
1:12:29 – Nested Loops
1:13:33 – Combining Implicit and Explicit Loops
1:14:55 – Array Processing
1:26:28 – Array Functions
How the SAS DATA Step Works: A Basic Introduction (documentation)
SAS Programming Community (online support community)
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.