Tag: Call Execute

How to evaluate SAS expression in DATA Step dynamically

In many programming languages, there is a function named eval() that can be used to evaluate an expression and return the result at run time. For example, in Python, the eval() function parses the expression passed to it and runs a Python expression or code within the program. Even Python […]

How to evaluate SAS expression in DATA Step dynamically was published on SAS Users.

SAS Data Driven Programming: My 4 Favorite Techniques

I use relatively fixed patterns in my SAS  programming life. For so called data driven programming (or dynamic programming), I used the following 4 techniques, chronologically: macro array call execute list processing for each loop For a quick demo, I will start with a simple scenario in which the data set sashelp.zipcode should be spitted […]

CALL EXECUTE: Easy way to print or sort multiple files.

When printing multiple files, or sorting multiple datasets, the traditional method is to write multiple steps as below.

Proc print data=libref.ae; var _all_; run;

Proc print data=libref.conmed; var _all_; run;

Proc print data=libref.demog; var _…