Getting Started with SAS under OpenVMS |
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.
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.
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:
Type options on the command line of any SAS windowing environment window or windowing procedure window, and then press ENTER.
From the Tools menu, select Options , and then select System .
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:
double-click the window menu button in the upper-left corner
click the window menu button in the upper-left corner and select Close from the menu
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.
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 |
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.
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.
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.
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
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.
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:
restricted configuration files:
For more information about restricted configuration files, see the Configuration Guide for SAS 9.2 Foundation for OpenVMS on HP Integrity.
System Options window or OPTIONS statement (submitted from a SAS session or job)
autoexec files that contain OPTIONS statements (after SAS is initialized, but before the user supplies input):
The restricted configuration files take precedence over all other occurrences of an option specification.
The System Options window or OPTIONS statement takes precedence over autoexec files.
The SAS command takes precedence over any created configuration files.
User-created configuration files take precedence over the VMS_SAS_OPTIONS DCL symbol.
The VMS_SAS_OPTIONS DCL symbol takes precedence over any default configuration file.
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:
A value that is specified in a statement option (for example, an engine/host option in the LIBNAME statement or an external I/O statement option in the FILENAME, INFILE, or FILE statement) takes precedence over a value that is specified in a system option.
A value that is specified in a data set option takes precedence over a value that is specified in a statement option.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.