Previous Page | Next Page

SAS System Options

Using SAS System Options


Default Settings

SAS system options are initialized with default settings when SAS is invoked. However, the default settings for some SAS system options vary both by operating environment and by site. Your on-site SAS support personnel might have created a default options table. The default options table is created by your site administrator and provides a global set of default values that are specific for your site. It reduces the need to duplicate options in every system configuration file at your site.

Information about creating and maintaining the default options table is provided in the configuration guide for SAS software for your operating environment.


Saving and Loading SAS System Options

SAS system options can be saved to either the SAS registry or a SAS data set by using the OPTSAVE procedure or by using the DMOPTSAVE command in the SAS windowing environment. Some system options cannot be saved. For a list of these options and additional information about saving options, see the OPTSAVE Procedure in Base SAS Procedures Guide.

To load a set of saved system options you use either the OPTLOAD procedure or the DMOPTLOAD command. For information about loading system option, see the OPTLOAD Procedure in Base SAS Procedures Guide.

For information about the DMOPTSAVE command and the DMOPTLOAD command, see the SAS Help and Documentation.


Determining Which Settings Are in Effect

To determine which settings are in effect for SAS system options, use one of the following:

OPLIST system option

Writes to the SAS log the system options that were specified on the SAS invocation command line. (See the SAS documentation for your operating environment for more information.)

VERBOSE system option

Writes to the SAS log the system options that were specified in the configuration file and on the SAS invocation command line.

SAS System Options window

Lists all system option settings.

OPTIONS procedure

Writes system option settings to the SAS log. To display the settings of system options with a specific functionality, such as error handling, use the GROUP= option:

proc options GROUP=errorhandling;
run;
(See the Base SAS Procedures Guide for more information.)
GETOPTION function

Returns the value of a specified system option.

VOPTION Dictionary table

Located in the SASHELP library, VOPTION contains a list of all current system option settings. You can view this table with SAS Explorer, or you can extract information from the VOPTION table using PROC SQL.

dictionary.options SQL table

Accessed with the SQL procedure, this table lists the system options that are in effect.


Restricted Options

Restricted options are system options whose value are determined by the site administrator and cannot be overridden. The site administrator can create a restricted options table that specifies the option values that are restricted when SAS starts. Any attempt to modify a system option that is listed in the restricted options table is either ignored, or if you use the OPTIONS statement to set a restricted option, SAS issues a warning message to the log.

To determine which system options are restricted by your site administrator, use the RESTRICT option of the OPTIONS procedure. The RESTRICT option displays the option's value, scope, and setting. In the following example, the SAS log shows that only one option, CMPOPT, is restricted:

proc options restrict;
run;

Restricted Option Information

1    proc options restrict;
2    run;
    SAS (r) Proprietary Software Release xxx  TS1B0

Option Value Information For SAS Option CMPOPT
    Option Value: (NOEXTRAMATH NOMISSCHECK NOPRECISE NOGUARDCHECK NOFUNCDIFFERENCING)
    Option Scope: SAS Session
    How option value set:  Site Administrator Restricted

The OPTIONS procedure displays this information for all options that are restricted. If your site administrator has not restricted any options, then the following message appears in the SAS log:

Your site administrator has not restricted any options.

The following table lists the system options that cannot be restricted:

System Options That Cannot Be Restricted
Option All
Operating Environments
OpenVMS UNIX Windows z/OS
ALTLOG X



ALTPRINT X



ASYNCHIO



X
AUTOEXEC X



BOMFILE X



BOTTOMMARGIN X



COMDEF

X X
CONFIG X



CPUCOUNT X



DATESTYLE X



DBCS

X

DFLANG X



DLDMGACTION X



DMR X



DMS X



DMSEXP X



DMSPGMLINESIZE X



ENGINE X



EXPLORER X



FILELOCKWAITMAX

X X
INITCMD X



INITSTMT X



JREOPTIONS



X
LEFTMARGIN X



LINESIZE X



_LAST_ X



LOG X



LOGAPPLNAME X



LOGPARM X



MEMCACHE


X
MEMLIB


X
METAPASS X



METAPROTOCOL X



METAREPOSITORY X



METASERVER X



METAUSER X



MSYMTABMAX X



MVARSIZE X



OBJECTSERVER X



ORIENTATION X



OVP X



PAGESIZE X



PAPERSIZE X



PATH


X
PDFPASSWORD X



PRINT X



PRINTERPATH X



RESOURCESLOC


X
RIGHTMARGIN X



SASCONTROL


X
SASFRSCR X



SASUSER X



SGIO


X
SOURCE X



SSLPKCS12LOC

X

SSLPKSC12PASS

X

SSPI X



STARTLIB X



SYSIN X



SYSPRINTFONT X



TERMINAL X



TOOLDEF


X
TOPMARGIN X



TRANTAB X



USER X



WORK X




Determining How a SAS System Option Value Was Set

To determine how a system option value was set, use the OPTIONS procedure with the VALUE option specified in the OPTIONS statement. The VALUE option displays the specified option's value and scope. For example, the following statements write a message to the SAS log that tells you how the option value for the system option CENTER was set:

proc options option=center value;
run;

The following partial SAS log shows that the option value for CENTER was the shipped default.

Option Value Information for the System Option CENTER

2    proc options option=center value;
3    run;


Option Value Information for SAS Option CENTER
    Option Value: CENTER
    Option Scope: Default
    How option value set:  Shipped Default

If no value is assigned to a character system option, then SAS assigns the option a value of ' ' (a space between two single quotation marks) and Option Value displays a blank space.


Obtaining Descriptive Information about a System Option

You can quickly obtain basic descriptive information about a system option by specifying the DEFINE option in the PROC OPTIONS statement.

The DEFINE option writes the following descriptive information about a system option to the SAS log:

For example, the following statements write a message to the SAS log that contains descriptive information about the system option CENTER:

proc options option=center define;
run;

Descriptive Information for the System Option CENTER

1    proc options option=center define;
      2   run;
 CENTER
 Option Definition Information for SAS Option CENTER
    Group= LISTCONTROL
    Group Description: Procedure output and display settings
    Description: Center SAS procedure output
    Type: The option value is of type BOOLEAN
    When Can Set: Startup or anytime during the SAS Session
    Restricted: Your Site Administrator can restrict modification of this option
    Optsave: Proc Optsave or command Dmoptsave will save this option.
    

Changing SAS System Option Settings

SAS provides default settings for SAS system options. You can override the default settings of any unrestricted system option in several ways, depending on the function of the system option:

SAS system options can be restricted by a site administrator so that after they are set by the administrator, they cannot be changed by a user. Depending upon your operating environment, system options can be restricted globally, by group, or by user. You can use the OPTIONS procedure to determine which options are restricted. For more information about how to restrict options, see the SAS configuration guide for your operating environment. For more information about the OPTIONS procedure, see The OPTIONS procedure in Base SAS Procedures Guide and the SAS documentation for your operating environment.


How Long System Option Settings Are in Effect

When you specify a SAS system option setting, the setting applies to the next step and to all subsequent steps for the duration of the SAS session, or until you reset the system option setting, as shown:

data one;
   set items;
run;  

   /* option applies to all subsequent steps */
options obs=5; 

  /* printing ends with the fifth observation */
proc print data=one;
run;

   /* the SET statement stops reading
      after the fifth observation */ 
data two; 
   set items;
run;

To read more than five observations, you must reset the OBS= system option. For more information, see OBS= System Option.


Order of Precedence

If the same system option appears in more than one place, the order of precedence from highest to lowest is

  1. restricted options table, if it exists

  2. OPTIONS statement and SAS System Options window

  3. autoexec file (that contains an OPTIONS statement)

  4. command-line specification

  5. configuration file specification

  6. SAS system default settings.

Operating Environment Information:   In some operating environments, you can specify system options in other places. See the SAS documentation for your operating environment.  [cautionend]

The following table shows the order of precedence that SAS uses for execution mode options. These options are a subset of the SAS invocation options and are specified on the command line during SAS invocation.

Order of Precedence for SAS Execution Mode Options
Execution Mode Option Precedence
OBJECTSERVER Highest
DMR 2nd
SYSIN 3rd
INITCMD 4th
DMS 4th
DMSEXP 4th
EXPLORER 4th
none (default is interactive line mode under UNIX and OpenVMS; interactive full screen mode under z/OS) 5th

The order of precedence of SAS execution mode options consists of the following rules:

See the descriptions of the individual options for more details.

Interaction with Data Set Options

Many system options and data set options share the same name and have the same function. System options remain in effect for all DATA and PROC steps in a SAS job or session until their settings are changed. A data set option, however, overrides a system option only for the particular data set in the step in which it appears.

In this example, the OBS= system option in the OPTIONS statement specifies that only the first 100 observations will be read from any data set within the SAS job. The OBS= data set option in the SET statement, however, overrides the system option and specifies that only the first five observations will be read from data set TWO. The PROC PRINT step uses the system option setting and reads and prints the first 100 observations from data set THREE:

options obs=100;    

data one;
   set two(obs=5);  
run;

proc print data=three; 
run;

Previous Page | Next Page | Top of Page