BookmarkSubscribeRSS Feed

The Fundamentals of DATA Step Programming

Started ‎08-04-2020 by
Modified ‎08-04-2020 by
Views 2,737

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:

 

  1. The Essence of DATA Step Programming
  2. How Best to Write a Loop in the DATA Step
  3. The Many Ways to Effectively Utilize Array Processing

 

 

 

Video highlights

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

 

Read the Paper

 

 

Related resources

How the SAS DATA Step Works: A Basic Introduction (documentation)

SAS Programming Community (online support community)

 

 

Contributors
Version history
Last update:
‎08-04-2020 03:33 PM
Updated by:

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Tags