Previous Page | Next Page

The REGISTRY Procedure

PROC REGISTRY Statement


PROC REGISTRY <option(s)>;

Task Option
Erase from the SASUSER registry the keys that were added by a user. CLEARSASUSER
Compare two registry files. COMPAREREG1= and COMPAREREG2=
Compare the contents of a registry to a file. COMPARETO=
Enable registry debugging. DEBUGON
Disable registry debugging. DEBUGOFF
Write the contents of a registry to the specified file. EXPORT=
Provide additional information in the SAS log about the results of the IMPORT= and the UNINSTALL= options. FULLSTATUS
Import the specified file to a registry IMPORT=
Write the contents of the registry to the SAS log. This option is used with the STARTAT= option to list specific keys. LIST
Write the contents of the SASHELP portion of the registry to the SAS log. LISTHELP
Send the contents of a registry to the log. LISTREG=
Write the contents of the SASUSER portion of the registry to the SAS log. LISTUSER
Start exporting or writing or comparing the contents of a registry at the specified key. STARTAT=
Delete from the specified registry all the keys and values that are in the specified file. UNINSTALL=
Use uppercase for all incoming key names. UPCASE
Use uppercase for all keys, names, and item values when you import a file. UPCASEALL
Perform the specified operation on the SASHELP portion of the SAS registry. USESASHELP


Options

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.
Featured in: Comparing Registry Files
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.
Featured in: Comparing Registry Files
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.
Featured in: Comparing the Registry to an External File
See also: 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.

Interaction: 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.
Interaction: To export a single key and all of its subkeys, specify the STARTAT= option.
Featured in: Listing and Exporting the Registry
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.  [cautionend]

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, 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.
Interaction: To obtain additional information in the SAS log as you import a file, use FULLSTATUS.
Featured in: Importing a File to the Registry
See also: For information about how to structure a file that contains registry information, see Creating Registry Files with the REGISTRY Procedure.
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.
Featured in: Listing and Exporting the Registry
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.
Featured in: Comparing Registry Files
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 Language Reference: Dictionary.)

Interaction: 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.
Interaction: Use FULLSTATUS to obtain additional information in the SAS log as you uninstall a registry.
See also: 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.

Previous Page | Next Page | Top of Page