Chapter Contents

Previous

Next
SAS Companion for UNIX Environments

Customizing Your SAS Session

You can customize your SAS session by defining configuration and/or autoexec files. You can use these files to specify system options and to execute SAS statements automatically whenever you start a SAS session. (SAS system options control many aspects of your SAS session, including output destinations, the efficiency of program execution, and the attributes of SAS files and data libraries. Refer to SAS Language Reference: Dictionary for a complete description of system options.)

The differences between configuration files and autoexec files are

The configuration file (for Version 8) is typically named sasv8.cfg, and the autoexec file is named autoexec.sas. These files typically reside in your home directory.


Specifying System Options

SAS system options can be specified in one or more ways:

Summary of All SAS System Options shows where each SAS system option can be specified.

Any options that do not affect the initialization of the SAS System, such as CENTER and NOCENTER, can be specified and changed at any time.

Some options can be specified only in a configuration file, in the SASV8_OPTIONS variable, or in the SAS command. These options determine how the SAS System initializes its interfaces with the operating system and the hardware; they are often called configuration options. After you start a SAS session, these options cannot be changed. Usually, configuration files specify option that you would not change very often. In those cases when you need to change an option just for one job, specify the change in the SAS command.

The default values for SAS system options will be appropriate for many of your SAS programs. However, you can override a default setting using one or more of the following methods:

In general, use quotes to enclose filenames and pathnames specified in the OPTIONS statement or the System Options window. Do not use quotes otherwise. Any exceptions are discussed under the individual option. You can use the abbreviations listed in Character Substitutions in Pathnames to shorten the filenames and pathnames you specify.


Processing System Options Set in One Place

If the same option is set more than once within the SAS command, only the last setting is used; the others are ignored. For example, the DMS option is ignored in this case:

sas -dms -nodms
However, if the same option is set more than once within a configuration file, or within the SASV8_OPTIONS environment variable, only the first setting is used; the others are ignored. For example, the NODMS option is ignored in the following case:
-dms
-linesize 80
-nodms

By default, if you specify the HELPLOC, MAPS, MSG, SAMPLOC, SASAUTOS, or SASHELP system options more than one time, the last value that is specified is the value that SAS uses. If you want to add additional pathnames to the pathnames already specified by one of these options, you must use the APPEND or INSERT system options to add the new pathname. See APPEND and INSERT for more information.


Processing System Options Set in Multiple Places

When the same option is set in more than one place, the most recent specification is used. In the following list, settings in places listed first override settings in places listed farther down:

  1. System Options window or OPTIONS statement (from a SAS session or job).

  2. autoexec file that contains an OPTIONS statement (after the SAS System initializes)

  3. SAS command

  4. SASV8_OPTIONS environment variable

  5. configuration files (before the SAS System initializes)

For example, if a configuration file specifies NOSTIMER, you can override the setting in the SAS command.

By default, if you specify the HELPLOC, MAPS, MSG, SAMPLOC, SASAUTOS, or SASHELP system option more than one time, the last value that is specified is the value that SAS uses. If you want to add additional pathnames to the pathnames already specified by one of these options, you must use the APPEND or INSERT system options to add the new pathname. See APPEND and INSERT for more information.


Processing Configuration Files

The SAS System is shipped with a default configuration file in the sasroot directory. Your SAS Installation Representative can edit this configuration file so that it contains whichever options are appropriate to your site.

You can also create one or more of your own configuration files. SAS reads the option settings from each of these files in this order:(footnote 1)

  1. sasv8.cfg in your current directory.

  2. sasv8.cfg in your home directory.

  3. .sasv8.cfg in your home directory. (Notice the leading period.)

  4. sasv8.cfg in the sasroot directory. (See The sasroot Directory.)

You can bypass this search by:

filename is the name of a file containing SAS system options.

If you have specified a configuration file in the SASV8_OPTIONS or SASV8_CONFIG environment variables, you can prevent the SAS System from using that file by specifying NOCONFIG in the SAS command.

To create a configuration file, you can copy sasv8.cfg from the sasroot directory and modify it to set the options you want.


FOOTNOTE 1:  For future versions of SAS, the extensions of these files will change accordingly. [arrow]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.