- Avoid necessary DATA steps.
- IF statements before loading raw data.
- Use of WHERE statements in procedures.
- Drop unnecessary variables by using KEEP/DROP.
- Optimize size of variables using LENGTH.
- Use of IF-THEN-ELSE statements when possible instead of an IF-THEN sequence.
- Order of conditions inside the statements. The most frequent case should be the first.
- Multiple OR operators instead of IN.
- Use of DATA _NULL_ when creating Reports.
- Use of permanent data sets in libraries.
- use of PROC DATASETS to modify variables, instead of DATA statements.
- PROC APPEND to join similar datasets.
- Use RETAIN statement to initialize contents
- Avoid unnecessary sorts: two-level sort instead of one-level sort and a two-level sort.
- Sort only what we have to sort
- Sort: Using NOEQUALS if we do not neet the relative order.
Welcome to Fer programes, a blog created with the intention to help us and other programmers in the developing of IT applications. It includes some commands used previously to solve specific problems, links to interesting web pages and general explanations about informatic topics. You are free to collaborate with comments when you consider it is oportune.
Saturday, October 30, 2010
SAS - Efficiency
Some SAS recommendations for making the code more efficient.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment