Customizing the SAS Environment |
Ways to Customize |
As you become familiar with SAS, you will probably develop preferences for how you want SAS configured. Many options are available to you to make SAS conform to your preferred working style. Some of the things that you can change are the following:
You can customize your current SAS session in the following ways:
Customizing SAS Sessions and Programs at Startup |
You can specify some system options only when you invoke SAS. These system options affect the following:
Note: There are other system options that you can specify at any time. For more information, see Customizing with SAS System Options.
Usually, any invocation-only options are set by default when SAS is installed at your site. However, you can specify invocation-only options on the command line each time you invoke SAS.To avoid having to specify options that you use every time you run SAS, set the options in a configuration file. Each time you invoke SAS, SAS looks for that file and uses the customized settings it contains. Be sure to examine the default configuration file before creating your own.
Note: If you specify options both in the configuration file and in the SAS command, then the options are concatenated. If you specify an option in the SAS command that also appears in the configuration file, then the setting from the SAS command overrides the setting in the configuration file.
To display the current settings for all options that are listed in the configuration file and on your command line as you invoke the system, use the VERBOSE system option in the SAS command.
Just as you can set SAS system options automatically when you invoke SAS, you can also execute statements automatically when you invoke SAS by creating a special autoexec file. Each time you invoke SAS, it looks for this special file and executes any of the statements it contains.
You can save time by using this file to execute statements that you use routinely. For example, you might add the following statements:
OPTIONS statements that include system options that you use regularly
FILENAME and LIBNAME statements to define the file shortcuts and libraries that you use regularly
Operating Environment Information: In order to execute SAS statements automatically in the CMS operating environment, you must have a file shortcut defined as SASEXEC.
Customizing with SAS System Options |
SAS system options determine global SAS settings. For example, the global options can affect the following:
The previous section discusses some invocation-only options that must be set at startup. However, there are many system options that can be set at any time. These system options can be set in an OPTIONS statement as well as in the SAS Options window.
It is important to note that system option settings remain in effect until you change them again, or until your current session ends.
There are several ways to view your system option settings. The two most common methods are the following:
To obtain a complete list of system option settings using the OPTIONS procedure, submit the following statements:proc options; run;
The SAS Options window groups options by function. The left side of the window includes a tree that lists the available option groups. You can expand option groups to see subgroups.
Operating Environment Information: Mainframe users can expand groups and subgroups by using the mouse or by typing an S or an X before the group or subgroup name. When you select a subgroup, the individual options of that subgroup appear on the right side of the window.
SAS Options Window
To open the SAS Options window, do one of the following tasks:
The options in each group or subgroup are listed alphabetically, followed by options that are specific to your operating environment (which are also listed alphabetically).
You can find options in a number of ways.
Expand the option groups and subgroups on the left side of the window until the appropriate option appears on the right side of the window.
Select an option group or subgroup, then select Find Option from the pop-up menu. In the Find Option window, enter the name of the option that you want to locate, and then select OK.
In the SAS Options window, find the option that you want to set.
Select the option from the right side of the SAS Options window.
Select Modify Value or Set to Default from the pop-up menu. Mainframe users can type an S or an X before the option name to access the pop-up menu.
Select OK to save your changes. Select Reset to return all edited options to their previous values.
Note: If all the items on the pop-up menu are grayed out (that is, unavailable), then the options are invocation-only options and can be set only when a SAS session is started.
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.