Chapter Contents |
Previous |
Next |
SAS Companion for the Microsoft Windows Environment |
There are several ways to specify values for SAS system options:
Tools | Options | System... |
Some system options can be specified only when a SAS session or process is initialized (starts up), while other options can be changed as needed during your SAS session.
It is important to remember the differences in syntax between specifying a system option in the command that invokes SAS command or in the SAS configuration file and specifying it in the OPTIONS statement. The syntax for these situations is different, and if you use the wrong syntax, SAS generates an error message. For information on the OPTIONS statement, see SAS Language Reference: Dictionary.
Syntax for System Options in the SAS Invocation or SAS Configuration File |
c:\sas\sas.exe -nocenter
For options that take a value, do not use an equal sign; follow the option name with a space and then the value. For example, the following SAS command invokes the SAS System with a line length of 132:
c:\sas\sas.exe -linesize 132
Physical names (that is, directory names or filenames) should be enclosed in double quotes when you use them in the SAS command or in the SAS configuration file. The quotes are especially necessary when the file or path name that you are specifying contains a space or single quote character, which are valid characters in Windows filenames. For example, the following SAS command invokes the SAS System and indicates that autocall macros are stored in the C:\SAS\CORE\SASMACRO directory:
c:\sas\sas.exe -sasautos "c:\sas\core\sasmacro"
Double quotation marks are also needed when an option value contains `=', as shown in this example:
c:\sas\sas.exe -set fruit "navel=orange"
To specify more than one option in the SAS command, simply separate each option with a space. For example, the following SAS command combines the three options shown previously in this section:
c:\sas\sas.exe -linesize 132 -nocenter -sasautos "c:\sas\core\sasmacro"
The SAS configuration file must contain only option settings; it cannot contain SAS statements. For example, a configuration file named MySASConfig.CFG may contain these option specifications (among others):
-nocenter -noxwait -pagesize 60
All SAS system options can appear in a SAS configuration file. For more information on SAS configuration files, see SAS Configuration Files.
Syntax for Concatenating Libraries in SAS System Options |
One practical use of concatenation is the storage of SAS help catalogs. If you want to partition your SAS products among two or more directories, simply specify these multiple directories with the SASHELP option in the SAS configuration file, as in the following example:
-sashelp ("c:\sas\core\sashelp" "d:\sas\stat\sashelp")
Syntax for System Options in the OPTIONS Statement |
When you specify a system option in the OPTIONS statement, do not precede the option name with a hyphen (-). Also, for system options that take a value, use an equal sign (=), not a space. For example, the following statement specifies that output is not to be labeled with a date and that the line size should be 132:
options nodate linesize=132;
Physical names (that is, directory names or filenames) must be enclosed in quotes when used in the OPTIONS statement. For example, the following OPTIONS statement indicates that autocall macros are stored in the C:\SAS\CORE\SASMACRO directory:
options sasautos="c:\sas\core\sasmacro";
Any file specification that is not enclosed in quotes in the OPTIONS statement is assumed to be a logical name, that is, a fileref or an environment variable name. If no logical name is found, the SAS System issues an error message.
Not all system options can be specified in the OPTIONS statement. To find out whether a system option can be specified in the OPTIONS statement, look up the option name in Summary of SAS System Options, which summarizes all SAS system option information, including where you can specify the options.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.