Previous Page | Next Page

Getting Started with SAS under OpenVMS

Customizing Your SAS Session Using System Options


Displaying and Setting System Option Settings

Most SAS system options are set to default values. To display the current settings of SAS system options, use either the OPTIONS procedure, the System Options window, or the GETOPTION function.


OPTIONS Procedure

The OPTIONS procedure writes to the SAS log all system options that are available under OpenVMS. System Options under OpenVMS describes the system options listed by the OPTIONS procedure that are host-specific and that have host-specific behavior. SAS Language Reference: Dictionary describes all system options that have no host-specific behavior, but might be specified differently in various operating environments.

By default, the procedure lists one option per line with a brief explanation of what the option does. To list the options with no explanation, use the SHORT option:

proc options short;
   run;

For more information about the OPTIONS procedure, see OPTIONS Procedure: OpenVMS and Base SAS Procedures Guide.


System Options Window

The SAS System Options window displays the settings of the SAS system options. The system options are grouped by their function within SAS. Each group has at least one subgroup.

To display the System Options window, do one of the following:

You can select a group of system options by clicking on the icon to the left of the group name in the left side of the System Options window. To open a subgroup, either click the icon to the left of the subgroup name in the left side of the window, or double-click the subgroup name in the right side of the window. You will see a list of the system options in that subgroup, along with their values and a brief description.

You can also use the System Options window to change the settings of system options for the duration of your SAS session. To change the setting of a system option, either double-click the name of the system option, or with the cursor on the name of the system option, press the right mouse button, and select Modify Value . The Modify Value dialog box opens. You can modify the setting of the system option. Click OK to save your changes. Click Cancel to ignore any changes and close the Modify Value dialog box.

You can close the System Options window by doing one of the following:

For help and additional information about the System Options window, click Help in the window.

For additional information about system options settings, see Summary of SAS System Options under OpenVMS and SAS Language Reference: Dictionary.


GETOPTION Function

The GETOPTION function returns the value of a SAS system option or graphics option. It can be used within the DATA step or with %SYSFUNC in open code. For more information about the GETOPTION function, see SAS Language Reference: Dictionary.


Specifying System Options in the SAS Command


General Form of the SAS Command

The way you specify the SAS command determines the mode of operation that you use for running SAS, as well as the default SAS system options. The general form of the SAS command is the following:

$ SAS92/system-option-list file-specification

Both system-option-list and file-specification are optional. You can include system-option-list for any mode of operation. If you include file-specification, then SAS is invoked in noninteractive mode. If you do not include file-specification, then the mode of operation will be the SAS windowing environment. For details about invoking SAS in the different modes of operation, see Selecting a Mode of Operation under OpenVMS.

All SAS system options can be specified in the SAS command. Under OpenVMS, each option is preceded by a forward slash (/).

As Example 1: Setting the LINESIZE= and PRINT= System Options and Example 2: Specifying System Options in Noninteractive Mode show, system options that take a value (such as LINESIZE= and PRINT=) are specified in the following form:

/option-name=value

Note:   Any option value that is entered on the OpenVMS command line enclosed in single quotation marks (') is resolved to its symbol value before it is processed by SAS. Any quoted value that should not be resolved as a symbol must be enclosed in double quotation marks ("). For example, the values for the system options FMTSEARCH=, INITSTMT=, and SYSPARM= must be enclosed in double quotation marks.  [cautionend]

Other system options can be thought of as on (enabled) or off (disabled). Specifying just the keyword enables the option; specifying the keyword with the prefix NO disables the option. For more information, see Example 3: Disabling System Options.


Example 1: Setting the LINESIZE= and PRINT= System Options

In the following example, the LINESIZE= system option tells SAS to use a line length of 80 characters for the log file, the procedure output file, and the print file:

$ SAS92/LINESIZE=80/PRINT=SYS$LOGIN:TEST.OUT

The PRINT= system option tells SAS to route the procedure output to the file SYS$LOGIN:TEST.OUT.


Example 2: Specifying System Options in Noninteractive Mode

The next example invokes SAS in noninteractive mode, specifying the program file MYPROG and the LINESIZE= and PAGESIZE= system options:

$ SAS92/LINESIZE=60/PAGESIZE=80 MYPROG


Example 3: Disabling System Options

In the following example, the CENTER and STIMER system options are disabled:

$ SAS92/NOCENTER/NOSTIMER


Specifying System Options in the OPTIONS Statement

You can use the OPTIONS statement to specify system option settings at any time during a SAS session, except within data lines or parmcard lines. Settings remain in effect for the duration of the session or until you reset them with another OPTIONS statement.

Not all system options can be specified in an OPTIONS statement. The summary table of system options, Summary of SAS System Options, tells where each system option can be specified.

The following is an example of an OPTIONS statement:

options nodate linesize=72;

For more information about the OPTIONS statement, see SAS Language Reference: Dictionary.


Specifying SAS Options in the VMS_SAS_OPTIONS DCL Symbol

You can define SAS options with the VMS_SAS_OPTIONS DCL symbol by using the following syntax:

VMS_SAS_OPTIONS = "/option 1/option 2/..."

where option is the SAS option that you specify. This example defines a symbol in the local symbol table. To define a symbol in the global symbol table, replace = with ==.

Note:   Only one definition of the symbol is used by SAS, and the local table is searched before the global table. This means that if a local and a global version of the symbol are defined, the global version will be ignored.   [cautionend]


Precedence for System Option Specifications

For many system options, different values can be specified in the SAS command, in a configuration file, in an OPTIONS statement (submitted in an autoexec file or in a SAS program), and in the System Options window. When the same system option is set in more than one place, the order of precedence is as follows:

  1. restricted configuration files:

    1. user files

    2. group files

    3. global file

    For more information about restricted configuration files, see the Configuration Guide for SAS 9.2 Foundation for OpenVMS on HP Integrity.

  2. System Options window or OPTIONS statement (submitted from a SAS session or job)

  3. autoexec files that contain OPTIONS statements (after SAS is initialized, but before the user supplies input):

    1. process-level autoexec file

    2. job-level autoexec file

    3. group-level autoexec file

    4. system-level autoexec file

    5. cluster-level autoexec file

  4. SAS command

  5. configuration files (as SAS is being initialized):

    1. process-level configuration file

    2. job-level configuration file

    3. group-level configuration file

    4. system-level configuration file

    5. cluster-level configuration file

  6. VMS_SAS_OPTIONS DCL symbol:

    1. local or global symbol definition

  7. default configuration file: SAS$ROOT:[000000]sasv9.cfg

In other words:


Precedence for Similar Types of Options

Some SAS system options have the same effect (and usually the same name) as other types of options. For example, the BUFSIZE= system option is analogous to the BUFSIZE= data set option. Also, under OpenVMS, the CC= system option is analogous to the CC= external I/O statement option that is described in Host-Specific External I/O Statement Options in the FILENAME statement.

In the case of overlapping options, SAS uses the following rules of precedence:

Previous Page | Next Page | Top of Page