Introduction

This lesson demonstrates different ways of utilizing best SAS programming practices to optimize performance. As you compare the techniques described in this lesson, remember that differences in the use of resources are affected by which operating environment you work in and by the characteristics of your data.

This lesson is organized by topics that emphasize the following basic principles:

  • Execute only necessary statements.
  • Eliminate unnecessary passes of the data.
  • Read and write only the data that you require.
  • Store data in SAS data sets.
  • Avoid unnecessary procedure invocation.

Each topic includes comparative examples that can improve the efficiency of your programs. Write programs to generate your own benchmarks, and adopt the programming techniques that produce the most savings for you.

Note This lesson does not cover the Scalable Performance Data Engine (SPD Engine), which is a SAS 9.1 technology for threaded processing. For details about using the SPD Engine to improve performance, see the SAS documentation.


Notice: This lesson does not include guided practices. Also, the data sets that are used in examples throughout this lesson are not included in the sample data for this course. Therefore, the programs in this lesson will not run in your SAS session.


1.5 hours



In this lesson, you learn to efficiently
  • subset observations
  • create new variables
  • process and output data conditionally
  • create multiple output data sets and sorted subsets
  • modify variable attributes
  • select observations from SAS data sets and external files
  • subset variables
  • read data from SAS data sets
  • invoke SAS procedures.

complete the following lessons:

  • .


  • .


  • .