Introduction to the SAS Registry

What Is the SAS Registry?

The SAS registry is the central storage area for configuration data for SAS. For example, the registry stores the following:
  • the libraries and file shortcuts that SAS assigns at startup
  • the menu definitions for Explorer pop-up menus
  • the printers that are defined for use
  • configuration data for various SAS products
This configuration data is stored in a hierarchical form, which works in a manner similar to how directory-based file structures work under the operating environments in UNIX, Windows, VMS, and under the z/OS UNIX System Services (USS).
Note: Host printers are not referenced in the SAS registry.

Who Should Use the SAS Registry?

The SAS registry is designed for use by system administrators and experienced SAS users. This section provides an overview of registry tools, and describes how to import and export portions of the registry.
CAUTION:
If you make a mistake when you edit the registry, your system might become unstable or unusable.
Wherever possible, use the administrative tools, such as the New Library window, the PRTDEF procedure, Universal Print windows, and the Explorer Options window, to make configuration changes, rather than editing the registry directly. Using the administrative tools ensures that values are stored properly in the registry when you change the configuration.
CAUTION:
If you use the Registry Editor to change values, you are not warned if any entry is incorrect.
Incorrect entries can cause errors, and can even prevent you from starting a SAS session.

Where the SAS Registry Is Stored

Registry Files in the SASUSER and the SASHELP Libraries

Although the SAS registry is logically one data store, physically it consists of two different files located in both the SASUSER and SASHELP libraries. The physical filename for the registry is regstry.sas7bitm. By default, these registry files are hidden in the SAS Explorer views of the SASHELP and SASUSER libraries.
  • The SASHELP library registry file contains the site defaults. The system administrator usually configures the printers that a site uses, the global file shortcuts or libraries that are assigned at startup, and any other configuration defaults for your site.
  • The SASUSER library registry file contains the user defaults. When you change your configuration information through a specialized window such as the Print Setup window or the Explorer Options window, the settings are stored in the SASUSER library.

How to Restore the Site Defaults

If you want to restore the original site defaults to your SAS session, delete the regstry.sas7bitm file from your SASUSER library and restart your SAS session.

How Do I Display the SAS Registry?

You can use one of the following three methods to view the SAS registry:
  • Issue the REGEDIT command. This opens the SAS Registry Editor.
  • Select Solutionsthen selectAccessoriesthen selectRegistry Editor.
  • Submit the following line of code:
    proc registry list;
    run;
    This method prints the registry to the SAS log, and it produces a large list that contains all registry entries, including subkeys. Because of the large size, it might take a few minutes to display the registry using this method.
For more information about how to view the SAS registry, see the REGISTRY PROCEDURE in Base SAS Procedures Guide.

Definitions for the SAS Registry

The SAS registry uses keys and subkeys as the basis for its structure, instead of using directories and subdirectories like the file systems in DOS or UNIX. These terms and several others described here are frequently used when discussing the SAS Registry:
key
An entry in the registry file that refers to a particular aspect of SAS. Each entry in the registry file consists of a key name, followed on the next line by one or more values. Key names are entered on a single line between square brackets ([ and ]).
The key can be a place holder without values or subkeys associated with it, or it can have many subkeys with associated values. Subkeys are delimited with a backslash (\). The length of a single key name or a sequence of key names cannot exceed 255 characters (including the square brackets and the backslash). Key names can contain any character except the backslash and are not case sensitive.
The SAS Registry contains only one top-level key, called SAS_REGISTRY. All the keys under SAS_REGISTRY are subkeys.
subkey
A key inside another key. Subkeys are delimited with a backslash (\). Subkey names are not case-sensitive. The following key contains one root key and two subkeys:[SAS_REGISTRY\HKEY_USER_ROOT\CORE]
SAS_REGISTRY
is the root key.
HKEY_USER_ROOT
is a subkey of SAS_REGISTRY. In the SAS registry, there is one other subkey at this level it is HKEY_SYSTEM_ROOT.
CORE
is a subkey of HKEY_USER_ROOT, containing many default attributes for printers, windowing, and so on.
link
a value whose contents reference a key. Links are designed for internal SAS use only. These values always begin with the word “link:”.
value
the names and content associated with a key or subkey. There are two components to a value, the value name and the value content, also known as a value datum.
Section of the Registry Editor Showing Value Names and Value Data for the Subkey 'HTML'
Section of the Registry Editor Showing Value Names and Value Data for the Subkey 'HTML'
.SASXREG file
a text file with the file extension .SASXREG that contains the text representation of the actual binary SAS Registry file.