The SAS Registry |
Configuring Universal Printing |
Universal Printers should be configured by using either the PRTDEF procedure or the Print Setup window. The REGISTRY procedure can be used to back up a printer definition and to restore a printer definition from a SASXREG file. Any other direct modification of the registry values should be done only under the guidance of SAS Technical Support.
Configuring SAS Explorer |
While it is best to use the Explorer Options window to configure your Explorer settings, you can use the Registry Editor to view the current Explorer settings in the SAS registry. The Explorer Options Window is available from the TOOLS Options Explorer drop-down menu from within the Explorer. All the Explorer configuration data is stored in the registry under CORE\Explorer. The following table outlines the location of the most commonly used Explorer configuration data.
Configuring Libraries and File Shortcuts with the SAS Registry |
When you use the New Library window or the File Shortcut Assignment window to create a library reference (libref) or a file reference (fileref), these references are stored for future use when you click the Enable at Startup check box in either of these two windows.
Library references (librefs) and file references (filerefs) are saved when you check "Enable at startup" and they are stored in the SAS registry, where it is possible to modify or delete them, as follows:
You can use the Registry Editor to delete an "Enable at Startup" library reference by deleting the corresponding key under CORE\OPTIONS\LIBNAMES\"your libref". However, it is best to delete your library reference by using the SAS Explorer, which removes this key from the registry when you delete the library reference.
You can use the Registry Editor to delete an "Enable at Startup" file shortcut by deleting the corresponding key under CORE\OPTIONS\FILEREFS\"your fileref". However, it is best to delete your library reference by using the SAS Explorer, which removes this key automatically when you delete the file shortcut.
A site administrator might want to create a file shortcut which is available to all users at a site. To do this, you first create a version of the file shortcut definition in the SASUSER registry. Then you modify it so that it can be used in the SASHELP registry.
Note: You need special permission to write to the SASHELP part of the SAS registry.
Type the DMFILEASSIGN command. This opens the File Shortcut Assignment window.
Create the file shortcut that you want to use.
Check Enable at Startup.
Click
.Type the command REGEDIT after verifying that the file shortcut was created successfully.
Find and select the key CORE\OPTIONS\FILEREFS\<your fileref>.
SelectFile Export Registry File and export the file.
Edit the exported file and replace all instances of HKEY_USER_ROOT with HKEY_SYSTEM_ROOT.
To apply your changes to the site's SASHELP, use PROC REGISTRY. The following code will import the file:
proc registry import="yourfile.sasxreg" usesashelp; run;
A site administrator might want to create a library which is available to all users at a site. To do this, the SASUSER version of the library definition needs to be migrated to SASHELP.
Note: You need special permission to write to the SASHELP part of the SAS registry.
Type the dmlibassign command. This opens the New Library window.
Create the library reference that you want to use.
Select Enable at Startup.
Click
.Issue the regedit command after verifying that the library was created successfully.
Find and select the registry key CORE\OPTIONS\LIBNAMES\<your libref>.
Select File Export Registry File. The Save As window appears.
Select a location to store your registry file.
Enter a filename for your registry file in the File name field.
Click
to export the file.Right-click the file and select Edit in NOTEPAD to edit the file.
Edit the exported file and replace all instances of "HKEY_USER_ROOT" with "HKEY_SYSTEM_ROOT".
To apply your changes to the site's SASHELP use PROC REGISTRY. The following code will import the file:
proc registry import="yourfile.sasxreg" usesashelp; run;
Fixing Library Reference (Libref) Problems with the SAS Registry |
Library references (librefs) are stored in the SAS Registry. You might encounter a situation where a libref that previously worked, fails. In some situations, editing the registry is the fastest way to fix the problem. The following section describes what is involved in repairing a missing or failed libref.
If any permanent libref that is stored in the SAS Registry fails at startup, then the following note appears in the SAS Log:
NOTE: One or more library startup assignments were not restored.
The following errors are common causes of library assignment problems:
Required field values for libref assignment in the SAS Registry are missing.
Required field values for libref assignment in the SAS Registry are invalid. For example, library names are limited to eight characters, and engine values must match actual engine names.
Encrypted password data for a libref has changed in the SAS Registry.
Note: You can also use the New Library window to add librefs. You can open this window by typing DMLIBASSIGN in the toolbar, or selecting File New from the Explorer window.
If you are unfamiliar with librefs or the SAS Registry Editor, then ask for technical support. Errors can be made easily in the SAS Registry Editor, and can prevent your libraries from being assigned at startup.
To correct a libref assignment error using the SAS Registry Editor:
Select Solutions Accessories Registry Editor or issue the regedit command to open the Registry Editor.
Select one of the following paths, depending on your operating environment, and then make modifications to keys and key values as needed:
CORE\OPTIONS\LIBNAMES
or
CORE\OPTIONS\LIBNAMES\CONCATENATED
Note: These corrections are possible only for permanent librefs; that is, those that are created at start-up by using the New Library or File Shortcut Assignment window.
For example, if you determine that a key for a permanent, concatenated library has been renamed to something other than a positive whole number, then you can rename that key again so that it is in compliance. Select the key, and then select Rename from the pop-up menu to begin the process.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.