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.
|Determining Which Settings Are in Effect|
To determine which settings are in effect for a SAS system option, use one of the following:
Operating Environment Information: See the SAS documentation for your operating environment for more information.
proc options GROUP=errorhandling; run;
(See the SAS Procedures Guide for more information.)
|Changing SAS System Option Settings|
At invocation, SAS provides default settings for SAS system options. You can override the default settings
Many SAS system option settings can be specified only during SAS invocation. Descriptions of individual options provide details. At invocation, you can override the settings in the following places:
You can change any SAS system option setting on the command line.
If you use the same option settings frequently, it is usually more convenient to specify the options in a configuration file, rather than on the command line.
You can specify an OPTIONS statement at any time during a session except within data lines or parmcard lines. Settings remain in effect throughout the current program or process unless you reset them with another OPTIONS statement or change them in the SAS System Options window. You can also place an OPTIONS statement in an autoexec file.
If you are using a windowing environment, type
options in the toolbox to open the SAS System Options window. The
SAS System Options window lists the names of the SAS system options and allows
you to change their current settings. Changes take effect immediately and
remain in effect throughout the session unless you reset them with an OPTIONS
statement or change them in the SAS System Options window.
|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
Operating Environment Information: In some operating environments, you can specify system options in other places. See the SAS documentation for your operating environment.
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.
|Execution Mode Option||Precedence|
|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;
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.