Previous Page | Next Page

Customizing the SAS Environment

Customizing Session-to-Session Settings


Overview of Customizing Session-to-Session Settings

The previous section discusses making customizations that stay in effect for the duration of the current SAS session only. This section provides information about making customizations that remain from SAS session to SAS session.

You can make customizations that remain from session to session by using one of the following windows:


Customizing SAS Sessions and Applications with the SAS Registry Editor


Understanding the SAS Registry

The SAS Registry stores information about specific SAS sessions and applications. Unlike system options, customizations to the SAS Registry remain in effect for more than one SAS session. You can make SAS Registry customizations by using either PROC REGISTRY or the SAS Registry Editor.

This section shows you how to use the SAS Registry Editor, which is a graphical alternative to PROC REGISTRY. For more information about PROC REGISTRY, see the Base SAS Procedures Guide.

CAUTION:
Changes to SAS Registry should be well planned. In many cases, it is appropriate to have a designated person in charge of SAS Registry edits. Inappropriate SAS Registry edits can adversely affect your SAS session performance.   [cautionend]

SAS Registry Editor values, which store data, exist in keys and subkeys. Keys and subkeys, which look like folders, appear in a tree on the left side of the SAS Registry Editor. If a key has subkeys, then you can expand or collapse it with the + and - icons that are found in the tree. If a key or subkey has values, then the values appear on the right side of the window.

Operating Environment Information:   In the z/OS and CMS operating environments, you can select a + or - icon by positioning your cursor on it and then pressing the ENTER key.  [cautionend]

The SAS Registry Editor

[The SAS Registry Editor]

To customize SAS sessions and applications, use the SAS Registry Editor to add, modify, rename, and delete keys and key values.

You can also use the SAS Registry Editor to the following:


Opening the SAS Registry Editor

To open the SAS Registry Editor, select Solutions [arrow] Accessories [arrow] Registry Editor, or issue the REGEDIT command.


Finding Information in the SAS Registry Editor

You can search for specific information in the SAS Registry Editor, including specific keys, key value names, and key value data:

  1. Select the key from which you want to start a search.

  2. Open the drop-down menu and select Find.

  3. In the Registry Editor Find window, type your search string in the Find What field.

  4. Check one or more of the Keys, Value Name, or Value Data check boxes, depending on where you want to perform your search.

  5. Select Find to begin the search.


Setting Keys in the SAS Registry Editor

You can add, modify, rename, or delete keys in the SAS Registry Editor. For example, you might want SAS to be able to work with a new paper type when printing output. Therefore, you might need to create a new key that represents the paper type. Additionally, you would have to create and set key values for this new paper type. For more information, see Setting New Key Values in the SAS Registry Editor.

Note:   When you add a key, the new key becomes a subkey of the most recently selected key.  [cautionend]

To set a key in the SAS Registry Editor:

  1. Expand or collapse the keys on the left side of the SAS Registry Editor (using the + and - icons) until you find the appropriate key.

  2. With a key selected, select an action from the drop-down menu (such as New Key, Rename, or Delete). A dialog box appears that enables you to enter additional information or confirm an action.

CAUTION:
Delete removes all subkeys and values (if any) under the key that you are deleting.   [cautionend]

Setting New Key Values in the SAS Registry Editor

If you create a new key, then you might want to add values to that key. Adding values includes assigning a value name as well as the value data.

Note:   If your new key is similar to an existing key, then you might want to review that key's subkeys and key values. The review process might help you determine which subkeys and key values you should have for the new key.  [cautionend]

To add a new key value, do the following:

  1. Select the new key on the left side of the SAS Registry Editor.

  2. Select an action from the pop-up menu (such as New String Value, New Binary Value, or New Double Value).

  3. In the dialog box, enter a name and a value for the new key value.

  4. Select OK to complete the process.


Editing Existing Key Values in the SAS Registry Editor

  1. Select a key on the left side of the SAS Registry Editor.

  2. If the key contains subkeys, then continue to expand the key by selecting the + icon.

  3. Select the key value that you want to edit on the right side of the SAS Registry Editor.

  4. Select the appropriate action from the pop-up menu (such as Modify, Rename, or Delete). A dialog box appears that enables you to enter additional information or confirm an action.


Importing Registry Files

You can import a registry file to populate and modify the SAS Registry quickly. Registry files are text files that you create with a text editor. For information about registry file syntax, see PROC REGISTRY in the Base SAS Procedures Guide.

  1. Select File [arrow] Import Registry File.

  2. Select the file that you want to import, and then select OK.

If errors occur during the import, then a message appears in the status bar and the errors are reported in the Log window. All registry changes can be sent to the log if you use the SAS Registry Editor option Output full status to Log. For more information, see Setting Registry Editor Options.


Exporting Registry Files

You can export (or copy) all or a portion of the SAS Registry to a file:

  1. Select the key in the existing registry from where you want to begin exporting the file. Selecting a root key exports the entire tree, beginning at the root key that you select.

  2. Select File [arrow] Export Registry File.

  3. Enter the full path to the file or browse to select the file to which you want to save the existing registry, and then select OK.

If errors occur during the export, then a message appears in the status bar and the errors are reported in the Log window. All registry changes can be sent to the log if you use the Output full status to Log SAS Registry Editor option.


Uninstalling an Imported Registry File

The uninstall function reads an imported registry file and removes the keys found in the file from the registry. If any errors occur during this process, then a message appears in the status bar and errors are reported in the Log window.

Note:   SAS ships with a set of ROOT keys. ROOT keys are not removed during an uninstall process.  [cautionend]

  1. Select File [arrow] Uninstall Registry File.

  2. Select the external registry file that you want to uninstall from the SAS Registry, and then select OK. A message appears in the message line when the uninstall is complete.


Setting Registry Editor Options

  1. Open the SAS Registry Editor if it is not already open.

  2. From the Registry Editor window, select Tools [arrow] Options [arrow] Registry Editor.

  3. In the Select Registry View group box, choose a view for the Registry Editor.

    • View Overlay mode enables you to modify data anywhere in the registry. The HKEY_USER_ROOT overlays the HKEY_SYSTEM_ROOT. The parent root for overlay view mode is shown as SAS REGISTRY.

    • In View All mode, the Registry Editor shows all the entries that are contained in the two main entry points into the registry: HKEY_SYSTEM_ROOT and HKEY_USER_ROOT. Typically, the HKEY_SYSTEM_ROOT tree is stored in the SASHELP library and the HKEY_USER_ROOT is stored in the SASUSER library.

  4. Select or deselect appropriate check boxes:

    Open HKEY_SYSTEM _ROOT for write access

    enables you to open the registry for write access if you have write access to SASHELP.

    Output full status to Log

    writes to the log all changes that were made when the registry file was imported or uninstalled. Usually, only errors appear in the Log window.

    View unsigned integers in hexadecimal format

    enables you to view unsigned integers in the value list in HEX or DECIMAL format.

You can select Reset all options to return all Registry Editor Options window settings to the default values.


Customizing SAS Sessions with the Preferences Window

The Preferences window includes a series of tabs that you can access to set SAS preferences. Preferences enable you to customize and control your SAS environment. For example, you might use the General tab to select a startup logo, or the Results tab to control your output preferences, or even the Editing tab to set editor preferences, if, for example, your cursor inserts or overtypes text in an editor.

Preference window settings remain in effect from one SAS session to the next.

To access the Preferences window, select Tools [arrow] Options [arrow] Preferences or issue the DLGPREF command.

Operating Environment Information:   The Preferences window is unavailable in some operating environments. Additionally, some preference settings are specific to your operating environment. Refer to the SAS documentation for your operating environment for more information about setting preferences.  [cautionend]


Saving System Option Settings with the DMOPTSAVE and DMOPTLOAD Commands

Perhaps the easiest way to save your system option settings from one SAS session to another is to use the global commands DMOPTSAVE and DMOPTLOAD. After you set up your system options in a way that best suits your working style, type DMOPTSAVE at the command line and press ENTER. This saves the current system option settings for later use. Later, when you have started another SAS session and would like to retrieve your saved settings, type DMOPTLOAD at the command line and press ENTER. This changes your system option settings back to the system option settings in effect when you issued the DMOPTSAVE command.

The DMOPTSAVE and DMOPTLOAD commands have other useful features:

When you issue a DMOPTSAVE command without parameters, SAS saves a data set (myopts) that contains the system option settings to the default library. The default library is usually the library where the current user profile is. In most cases, this is the SASUSER library.

See SAS online Help for more details about using these commands.

Previous Page | Next Page | Top of Page