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 ...

Get PROC FCMP User-Defined Functions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.