Chapter Contents


SAS Language Reference: Dictionary

Using SAS System Options

Default Settings

Operating Environment Information:   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. For details, see the SAS documentation for your operating environment.  [cautionend]

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 settings in system and user configuration files that were set when SAS was invoked. (See the SAS documentation for your operating environment for more information.)

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 error handling, use the GROUP= option:
proc options GROUP=errorhandling;
(See the 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.

Changing SAS System Option Settings

At invocation, SAS provides default settings for SAS system options. There are several ways to override the default settings. Depending on the function of the system option, you can specify a setting

How Long System Option Settings Are in Effect

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

data one;
   set items;

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

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

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

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

Order of Precedence

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

  1. OPTIONS statement and SAS System Options window

  2. autoexec file (that contains an OPTIONS statement)

  3. command-line specification

  4. configuration file specification

  5. 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]

Order of Precedence for SAS Execution Mode Options 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
DMR 2nd
DMS 3rd

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 unless they are respecified. The data set option, however, overrides the system option only for 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, overrrides the system option and specifies that only the first 5 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);  

proc print data=three; 

Chapter Contents



Top of Page

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