Chapter 6: Getters and Setters
Variables are a core component of every programming language. They allow data to be stored, transformed, and otherwise manipulated during program execution. The SAS language is no different, and it defines both DATA step variables and macro variables. DATA step variables correspond to columns in a data set and do not persist across DATA steps. Macro variables, on the other hand, do persist across DATA steps, SAS procedures, and other statements, and thus fulfill a critical niche that DATA step variables cannot perform—communication across and among processes.
For example, consider the need within a program to evaluate today’s date and use it repeatedly across multiple DATA steps. The typical SAS solution is to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access