Chapter Contents

Previous

Next

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.

Operating Environment Information:   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 a SAS system option, 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.

Operating Environment Information:   See the SAS documentation for your operating environment for more information.  [cautionend]

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 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. You can override the default settings


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;
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 the OBS= system option in SAS Language Reference: Dictionary.


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]

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
INITCMD 3rd
DMS 3rd
DMSEXP 3rd
EXPLORER 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);  
run;

proc print data=three; 
run;


Chapter Contents

Previous

Next

Top of Page

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