Chapter Contents

Previous

Next
SAS Companion for the OS/2 Environment

Changing SAS System Option Settings

There are several ways to specify values for SAS system options:

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

When you specify a system option at initialization, it must be preceded by a hyphen (-). For on or off options, just list the keyword corresponding to the appropriate setting. For example, the following command invokes the SAS System and indicates that SAS output should not be centered:

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 OS/2 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 and comments. Iit 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 about SAS configuration files, see SAS Configuration Files.


Syntax for Concatenating Libraries in SAS System Options

To provide more flexibility for storing SAS files across different drives, such as multiple logical drives on your hard disk or on a network, the SAS System lets you concatenate SAS libraries. The concept of concatenation within the SAS System means that you can specify multiple drives or directories when you specify certain system options in the SAS configuration file or in the SAS command. To specify concatenated directories, specify the directory names inside parentheses, enclose each directory name in double quotes, and separate the directory names with spaces.

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

You can specify many SAS system options in an OPTIONS statement at any point within a SAS session. The options are set for the duration of the SAS session or until you change them with another OPTIONS statement. For more information about the OPTIONS statement, see SAS Language Reference: Dictionary .

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.