Chapter Contents |
Previous |
Next |
SAS Companion for the OpenVMS Operating Environment |
Under OpenVMS, you can customize the SAS System for your session in the following ways:
Note: For information about customizing your SAS windowing
environment, see Customizing the SAS Windowing Environment.
Specifying System Options in the SAS Command |
$ SAS8/system-option-list filename |
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 Introduction.
All SAS system options can be specified in the SAS command. Under OpenVMS, each option is preceded by a forward slash (/).
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:
$ SAS8/LINESIZE=80/PRINT=SYS$LOGIN:TEST.OUTThe 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:
$ SAS8/LINESIZE=60/PAGESIZE=80 MYPROG
As the examples 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
within single quotation marks (') is resolved to its symbol value before it
is processed by the SAS System. 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. In the following example, the CENTER and STIMER system options are disabled:
$ SAS8/NOCENTER/NOSTIMER
If no system options are specified in the SAS command, a configuration file, or an autoexec file, then the default system options that are shipped with the SAS System are in effect. However, your system manager may have overridden those default options. Ask your system manager for details about the default system options at your site.
For more information about SAS system options, see System Options and SAS Language Reference: Dictionary.
Configuration Files |
For Version 8, the configuration file is typically named SASV8.CFG. This file typically resides in your home directory.
Under OpenVMS, the OpenVMS logical name SAS$CONFIG is used to refer to SAS configuration files. This logical name can exist in one or more of the process-, job-, group-, or system-level logical name tables. Therefore, four types of configuration files can be created:
Ask your system manager which of these configuration
files are used at your site.
To create a configuration file, follow these steps:
/SASUSER=DISK:[JQK.SASUSER]/WORK=[JQK.SASWORK] /DMS/LINESIZE=80/PAGESIZE=60 /FULLSTIMER
Note: You cannot include comment lines in a configuration
file.
$ DEFINE SAS$CONFIG- _$ DISK:[DIRECTORY]MYCONFIG.CFG
For more information about creating logical names, see OpenVMS User's Manual.
If you have created the OpenVMS logical name SAS$CONFIG, then SAS automatically executes the configuration file that is associated with that logical name. If SAS$CONFIG exists in more than one logical name table, then SAS executes the configuration files in the order in which they are listed in Precedence for System Option Specifications.
Alternatively, you can use the CONFIG= system option in the SAS command to tell SAS where to find your configuration file. For example, the following SAS command invokes SAS and tells it to use the process-level configuration file MYCONFIG.CFG:
$ SAS8/CONFIG=DISK:[DIRECTORY]MYCONFIG.CFG
For example, suppose your site has a system-level configuration file (defined by the logical name SAS$CONFIG in your system-level logical name table) that contains the following system options:
/LINESIZE=80/PAGESIZE=60
Suppose that you have also created your own configuration file, MYCONFIG.CFG, and that it contains the following options:
/FULLSTIMER
Now suppose you use the following command to invoke SAS:
$ SAS8/CONFIG=MYCONFIG.CFG/VERBOSE
The contents of both the system-level configuration file and MYCONFIG.CFG are written to your OpenVMS display, as follows:
The /VERBOSE option was specified. SYSTEM SAS$CONFIG file /LINESIZE=80/PAGESIZE=60 PROCESS SAS$CONFIG or /CONFIG= file /FULLSTIMER
Autoexec Files |
For Version 8, the autoexec file is named AUTOEXEC.SAS. This file typically resides in your home directory.
For example, an autoexec file could contain the following lines:
options fullstimer linesize=75; libname mylib 'dev:[homedir.subdir]'; dm 'wait 0';In this example, the OPTIONS statement sets some SAS system options, the LIBNAME statement assigns a libref, and the DM statement executes a SAS windowing environment command.
Note: Some SAS system options can be specified only
when you invoke the SAS System. These system options cannot be specified in
an OPTIONS statement; therefore, they cannot be specified in an autoexec file. Summary of SAS System Options under OpenVMS
tells where each SAS system option can be specified.
Under OpenVMS, the OpenVMS logical name SAS$INIT is used to refer to SAS autoexec files. This logical name can exist in one or more of the process-, job-, group-, or system-level logical name tables. Therefore, four types of autoexec files can be created:
Ask your system manager which of these autoexec files
are used at your site.
To create an autoexec file, follow these steps:
$ DEFINE SAS$INIT- _$ DISK:[DIRECTORY]MYEXEC.SAS
For more information about creating logical names, see OpenVMS User's Manual.
If you have created the OpenVMS logical name SAS$INIT, then SAS automatically executes the statements in the autoexec file that is associated with that logical name. If SAS$INIT exists in more than one logical name table, then SAS executes the autoexec files in the order in which they are listed in Precedence for System Option Specifications.
$ SAS8/AUTOEXEC=DISK:[DIRECTORY]MYEXEC.SAS
options fullstimer linesize=75; libname mylib 'dev:[homedir.subdir]'; dm 'wait 0';
If you use the following command to invoke SAS, then the contents of MYEXEC.SAS will be written to the SAS log.
$ SAS8/AUTOEXEC=MYEXEC.SAS8/ECHOAUTO
For more information about the ECHOAUTO system option, see SAS Language Reference: Dictionary.
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.
Displaying System Option Settings |
The OPTIONS procedure writes to the SAS log all system options that are available under OpenVMS. System Options 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 are completely portable (that is, those that have no host-specific behavior) and that are portable but may 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 LIST option:
proc options list; run;
For more information about the OPTIONS procedure, see
OPTIONS
and SAS Language Reference: Dictionary.
To display the System Options window, do one of the following:
options
on the command
line of any SAS windowing environment window or windowing procedure window
and press RETURN.
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 on the name of the system
option, or with 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 then modify the setting
of the system option as desired. Click on [OK] to save your
changes. Click on [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:
Close
from the menu.
For help and additional information about the System Options window, click on [Help] in the window.
For additional information about system options settings,
see Summary of SAS System Options under OpenVMSand SAS Language Reference: Dictionary.
Precedence for System Option Specifications |
In other words, the System Options window or OPTIONS statement takes precedence over autoexec files; autoexec files take precedence over the SAS command; the SAS command takes precedence over configuration files; and the configuration files take precedence over the VMS_SAS_OPTIONS DCL symbol.
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, the SAS System uses the following rules of precedence:
SASUSER Library |
In addition to storing function key settings and window attributes, the SASUSER.PROFILE catalog is used to store your DEFAULT.FORM. The DEFAULT.FORM is created by the FORM subsystem. It is used to control the default destination of all output that is generated by the PRINT command during a SAS windowing environment session. For information about the FORM subsystem, see Host-Specific Frames of the FORM Window and SAS Language Reference: Concepts.
Under OpenVMS, the system-level logical name SAS$USER specifies the location of the default SASUSER data library. This logical name is defined when SAS is installed and points to SYS$LOGIN, your default login directory.
This name defines the location of the default SASUSER
data library. For more information about how to change this library with the SASUSER= system
option, see SASUSER=.
To tell SAS which library to use as your SASUSER library, use the SASUSER= system option when you invoke SAS. For example, if you want to designate a directory named MYSUSER as your SASUSER library, you would use the following command:
$ SAS8/SASUSER=DISK:[MYSUSER]
Any profile changes that you make during your session are saved in the SAS catalog SASUSER.PROFILE, which is a file in the MYSUSER directory. These changes will be retained when you end your SAS session.
OpenVMS Logical Names That SAS Uses |
Note: The installation procedure provides two command
procedure files, SAS8.COM and SAS8_SYSTEM.COM. The SAS8.COM file
defines process-level logical names. The SAS8_SYSTEM.COM file
defines system-level logical names.
You can also customize your SAS sessions by defining some of the logical names at the process or job level. (When a logical name is defined at both the system level and the job level, the job-level definition takes precedence.) In addition, some logical names that are not defined by the SAS8.COM or SAS8_SYSTEM.COM file at the system or process level can be defined by individual users at the process or job level (for example, SAS$CONFIG).
System-Level Logical Names That You Can Override |
Note: If
you define an OpenVMS search-list
logical name to reference a list of directories, and then use the DCL command
SET DEFAULT to change your default directory location to that logical name,
you cannot invoke the SAS System. When you use the SET DEFAULT command, it
modifies the SYS$DISK logical name
to reference the new location. SYS$DISK is
used in the definition of the SAS$LIBRARY logical
name. The SAS System is unable to locate the files that it requires when SAS$LIBRARY and SYS$DISK are
defined in this way. If you must set your default directory to an area that
is defined by a search-list logical name, then remove references to SYS$DISK in
all logical names that begin with SAS$.
Other Logical Names That You Can Define |
The following program uses the GETLOG function to determine whether the X statement executed properly. If the X statement did execute properly, then the program continues; if it did not, then the program stops.
x 'create/dir [sasxyz.newdir]'; data _null_; x=getlog('sas$x_status'); if x^="1" then do; put 'The directory was not created.'; put 'The OpenVMS return code was: ' x; put 'Program stopping.'; abort return; end; else put 'Directory was created successfully.'; run; libname mylib '[sasxyz.newdir]'; data mylib.test; input revenue expenses; profit=revenue-expenses; datalines; 39800.73 35678.93 28900.38 28456.99 40933.22 5683.33 ;
Note: The ABORT RETURN statement not only stops the
program, but also ends your SAS session.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.