Executing Only Necessary Statements

Overview

When you execute the minimum number of statements in the most efficient order, you minimize the hardware resources that SAS uses. The resources that are affected include disk usage, memory usage, and CPU usage.
Here are two techniques to keep in mind:
  • Subset your data as soon as is logically possible.
  • Process your data conditionally by using the most appropriate technique.

Positioning of the Subsetting IF Statement

To subset your data based on a newly derived or computed variable, use the subsetting IF statement in a DATA step in order to process only those observations that meet a specified condition.
The subsetting IF statement causes the DATA step to continue processing only ...

Get SAS Certification Prep Guide, 4th Edition 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.