REGISTRY Procedure

PROC REGISTRY Statement

Maintains the SAS registry.
Importing a File to the Registry

Comparing the Registry to an External File

Listing and Exporting the Registry

Comparing Registry Files

Specifying an Entire Key Sequence with the STARTAT= Option

Displaying a List of Fonts

Syntax

PROC REGISTRY <options>;

Summary of Optional Arguments

erases from the SASUSER registry the keys that were added by a user.
compares two registry files.
compares two registry files.
compares the contents of a registry to a file.
disables registry debugging.
enables registry debugging.
writes the contents of a registry to the specified file.
follows links that are found when processing the LIST command.
provides additional information in the SAS log about the results of the IMPORT= and the UNINSTALL= options.
imports the specified file to a registry.
limits the LIST, LISTUSER, LISTHELP, and LISTREG options output to display keys only.
limits the number of levels to display for the LIST, LISTUSER, LISTHELP, and LISTREG options.
writes the contents of the registry to the SAS log. This option is used with the STARTAT= option to list specific keys.
writes the contents of the SASHELP portion of the registry to the SAS log.
sends the contents of a registry to the log.
writes the contents of the SASUSER portion of the registry to the SAS log.
starts exporting or writing or comparing the contents of a registry at the specified key.
deletes from the specified registry all the keys and values that are in the specified file.
uses uppercase for all incoming key names.
uses uppercase for all keys, names, and item values when you import a file.
performs the specified operation on the SASHELP portion of the SAS registry.

Optional Arguments

CLEARSASUSER
erases from the SASUSER portion of the SAS registry the keys that were added by a user.
COMPAREREG1='libname.registry-name-1'
specifies one of two registries to compare. The results appear in the SAS log.
libname
is the name of the library in which the registry file resides.
registry-name-1
is the name of the first registry.
Requirement:Must be used with COMPAREREG2.
Interaction:To specify a single key and all of its subkeys, specify the STARTAT= option.
COMPAREREG2='libname.registry-name-2'
specifies the second of two registries to compare. The results appear in the SAS log.
libname
is the name of the library in which the registry file resides.
registry-name-2
is the name of the second registry.
Requirement:Must be used with COMPAREREG1.
COMPARETO=file-specification
compares the contents of a file that contains registry information to a registry. It returns information about keys and values that it finds in the file that are not in the registry. It reports the following items as differences:
  • keys that are defined in the external file but not in the registry
  • value names for a given key that are in the external file but not in the registry
  • differences in the content of like-named values in like-named keys
COMPARETO= does not report as differences any keys and values that are in the registry but not in the file because the registry could easily be composed of pieces from many different files.
file-specification is one of the following:
'external-file'
is the path and name of an external file that contains the registry information.
fileref
is a fileref that has been assigned to an external file.
Requirement:You must have previously associated the fileref with an external file in a FILENAME statement, a FILENAME function, the Explorer window, or an appropriate operating environment command.
Interaction:By default, PROC REGISTRY compares file-specification to the SASUSER portion of the registry. To compare file-specification to the SASHELP portion of the registry, specify the option USESASHELP.
See:For information about how to structure a file that contains registry information, see Creating Registry Files with the REGISTRY Procedure .
DEBUGON
enables registry debugging by providing more descriptive log entries.
DEBUGOFF
disables registry debugging.
EXPORT=file-specification
writes the contents of a registry to the specified file, where
file-specification is one of the following:
'external-file'
is the name of an external file that contains the registry information.
fileref
is a fileref that has been assigned to an external file.
Requirement:You must have previously associated the fileref with an external file in a FILENAME statement, a FILENAME function, the Explorer window, or an appropriate operating environment command.
If file-specification already exists, then PROC REGISTRY overwrites it. Otherwise, PROC REGISTRY creates the file.
Interactions:By default, EXPORT= writes the SASUSER portion of the registry to the specified file. To write the SASHELP portion of the registry, specify the USESASHELP option. You must have write permission to the SASHELP library to use USESASHELP.

To export a single key and all of its subkeys, specify the STARTAT= option.

FOLLOWLINKS
follows links that are found when processing the LIST option.
Normally the LIST option displays the values of the link items. If you use the FOLLOWLINKS option, the links are treated as keys, and items contained in the links are displayed.
FULLSTATUS
lists the keys, subkeys, and values that were added or deleted as a result of running the IMPORT= and the UNINSTALL options.
IMPORT=file-specification
specifies the file to import into the SAS registry. PROC REGISTRY does not overwrite the existing registry. Instead, it updates the existing registry with the contents of the specified file.
Note: .sasxreg file extension is not required.
file-specification is one of the following:
'external-file'
is the path and name of an external file that contains the registry information.
fileref
is a fileref that has been assigned to an external file.
Requirement:You must have previously associated the fileref with an external file in a FILENAME statement, a FILENAME function, the Explorer window, or an appropriate operating environment command.
Interactions:By default, IMPORT= imports the file to the SASUSER portion of the SAS registry. To import the file to the SASHELP portion of the registry, specify the USESASHELP option. You must have write permission to SASHELP to use USESASHELP.

To obtain additional information in the SAS log as you import a file, use FULLSTATUS.

See:For information about how to structure a file that contains registry information, see Creating Registry Files with the REGISTRY Procedure .
KEYSONLY
limits the LIST, LISTUSER, LISTHELP, and LISTREG options output to display keys only.
LEVELS=n
limits the number of levels to display for the LIST, LISTUSER, LISTHELP, and LISTREG options.
Requirement:LEVEL ≥ 1. LEVELS=0 behaves as if LEVELS was not specified.
LIST
writes the contents of the entire SAS registry to the SAS log.
Interaction:To write a single key and all of its subkeys, use the STARTAT= option.
LISTHELP
writes the contents of the SASHELP portion of the registry to the SAS log.
Interaction:To write a single key and all of its subkeys, use the STARTAT= option.
LISTREG='libname.registry-name'
lists the contents of the specified registry in the log.
libname
is the name of the library in which the registry file resides.
registry-name
is the name of the registry.
Example: proc registry listreg='sashelp.regstry'; run;
Interaction:To list a single key and all of its subkeys, use the STARTAT= option.
LISTUSER
writes the contents of the SASUSER portion of the registry to the SAS log.
Interaction:To write a single key and all of its subkeys, use the STARTAT= option.
STARTAT='key-name'
exports or writes the contents of a single key and all of its subkeys.
You must specify an entire key sequence if you want to start listing at any subkey under the root key.
Interaction:USE STARTAT= with the EXPORT=, LIST, LISTHELP, LISTUSER, COMPAREREG1=, COMPAREREG2= and the LISTREG options.
UNINSTALL=file-specification
deletes from the specified registry all the keys and values that are in the specified file.
file-specification is one of the following:
'external-file'
is the name of an external file that contains the keys and values to delete.
fileref
is a fileref that has been assigned to an external file. To assign a fileref you can do the following:
  • use the Explorer Window
  • use the FILENAME statement (For information about the FILENAME statement, see the section on statements in SAS Statements: Reference.)
Interactions:By default, UNINSTALL deletes the keys and values from the SASUSER portion of the SAS registry. To delete the keys and values from the SASHELP portion of the registry, specify the USESASHELP option. You must have write permission to SASHELP to use this option.

Use FULLSTATUS to obtain additional information in the SAS log as you uninstall a registry.

See:For information about how to structure a file that contains registry information, see Creating Registry Files with the REGISTRY Procedure .
UPCASE
uses uppercase for all incoming key names.
UPCASEALL
uses uppercase for all keys, names, and item values when you import a file.
USESASHELP
performs the specified operation on the SASHELP portion of the SAS registry.
Interaction:Use USESASHELP with the IMPORT=, EXPORT=, COMPARETO, or UNINSTALL option. To use USESASHELP with IMPORT= or UNINSTALL, you must have Write permission to SASHELP.