SAS Base Tutorials and Tips on Efficient Coding

Base SAS is core skill for every SAS programmer. Understanding the datastep completely is essential for SAS programmers who want to write efficient bug free code. New updates of SAS regularly expand what is achieveable in one datastep and allow the programmer to improve the efficiency of their code. The purpose of this page is to keep upto date with the latest efficiency techniques and procedures.

Top 5 SAS Efficiency Savings

  1. options compress = Yes;
    In most implimitations of SAS writing out large datasets will be one of the main time consuming factors, by compressing datasets the amount of writing is reduced so as well as saving space you also save time
  2. Index datasets with variables regularly used to look up variables.
    There's no point reading entire datasets when all you need is a a small subset(say less than 30 %) of the dataset, to avoid this consider indexing large datasets.
  3. Use a where clause to exclude observations you don't want to process.
  4. Use the keep= dataset option to exclude variables you don't want to process.
  5. If downloading information from a server try using a passthrough statement in proc SQL to get the server to do the work for you.

Resources for all SAS Programmers

Pharmaceutical SAS Programming

Our page on how SAS is used in Pharmaceutical industry. Talks about some of the latest techniques used in Clinical Trials.

SAS Marketing Analysis

Learn about techniques implemented by SAS that are used throughout the marketing industry.

SAS Statistical Programming

Find out about the latest Statistical Techniques that can be applied quickly and easily using SAS Stat software.