|SAS Companion for UNIX Environments|
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:
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:
-nocenter -verbose -linesize 64All SAS system options can appear in a configuration file.
export SASV8_OPTIONS='-xwait -nodate'
Settings that you specify in the SASV8_OPTIONS environment variable affect SAS sessions that are started when the variable is defined.
sas -option1 -option2...
For ON/OFF options, list the keyword corresponding to the appropriate setting. For options that accept values, list the keyword that identifies the option, followed by the option value. For example,
sas -nodate -work mywork
Settings that you specify in the SAS command last for the duration of the SAS session; or, for those options that can be changed within the session, until you change them. All options can be specified in the SAS command.
options nodate linesize=72; options editcmd='/usr/bin/xterm -e vi';
Refer to SAS Language Reference: Dictionary for more information on the OPTIONS statement. Not all options can be specified in the OPTIONS statement. To find out about a specific option, look up its name in Summary of All SAS System Options.
options nodate pagesize=80; filename rpt '/users/myid/data/report';
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 -nodmsHowever, 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:
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
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)
sasv8.cfgin your current directory.
sasv8.cfgin your home directory.
.sasv8.cfgin your home directory. (Notice the leading period.)
sasrootdirectory. (See The sasroot Directory.)
You can bypass this search by:
sas -config filename
export SASV8_OPTIONS='-config filename'
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
directory and modify it to set the options you want.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.