SAS Companion for the OS/2 Environment |
The
following are some additional features of the SAS System
that you can control to improve system performance and make efficient use
of your computer's resources.
- Create SAS data sets instead of accessing flat
ASCII files. The SAS System can access a SAS data set more efficiently than
it can read flat files.
Also, you should convert existing data sets that you
use frequently to Version 8 format.
- In your SAS code, use IF-THEN-ELSE conditional
structures instead of multiple IF-THEN structures. When one condition in the
IF-THEN-ELSE structure is met, control returns to the top of the structure
(skipping the ELSE clause, which might contain subsequent IF-THEN structures).
With multiple IF-THEN structures, each condition must be checked.
- When using arrays, make them _TEMPORARY_ if possible.
This speeds retrieval time.
- Use programming structures that reduce file I/O,
the most time-intensive aspect of SAS processing. Some ideas for reducing
file I/O are
- Use the WHERE statement in a procedure to reduce
extra data processing.
- Use indexed data sets to speed access to observations.
- Use the SQL procedure to subset and
group your
data.
- Experiment with the value of the CATCACHE system
option, which specifies the number of SAS catalogs to keep open at one time.
By default, no catalogs are cached in memory (and CATCACHE is set to 0). Caching
catalogs is an advantage if one SAS application uses catalogs that are subsequently
needed by another SAS application. The second SAS application can access the
cached catalog more efficiently.
Note: Storing catalogs in memory can consume considerable
resources. Use this technique only if memory is not a concern.
- Store your data sets in a compressed format (using
the COMPRESS data set option). This can improve the performance of your SAS
application, though it might require more CPU time to decompress observations
as SAS needs them. The COMPRESS data set option is described in the data set
options section of SAS Language Reference: Dictionary.
- You can use the resource file tracking facility
to create a scaled-down copy of the SAS System that occupies the least amount
of hard disk space necessary. For more information, see Creating a Scaled-Down Configuration of the SAS System for Distribution.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.