Previous Page | Next Page

The REGISTRY Procedure

Example 3: Comparing the Registry to an External File


Procedure features: COMPARETO= option
Other features: FILENAME statement

This example compares the SASUSER portion of the SAS registry to an external file. Comparisons such as this one are useful if you want to know the difference between a backup file that was saved with a .txt file extension and the current registry file.

Note:   To compare the SASHELP portion of the registry with an external file, specify the USESASHELP option.  [cautionend]


Program

 Note about code
filename testreg 'external-file';
 Note about code
proc registry 
   compareto=testreg;
run;

Output: SAS Log

Output From Comparing the Registry to an External File

1   filename testreg 'external-file';
2   proc registry
3     compareto=testreg;
4  run;
Parsing REG file and comparing the registry please wait....
COMPARE DIFF: Value "Initialized" in 
[HKEY_USER_ROOT\CORE\EXPLORER\CONFIGURATION]: REGISTRY TYPE=STRING, CURRENT 
VALUE="True"
COMPARE DIFF: Value "Initialized" in 
[HKEY_USER_ROOT\CORE\EXPLORER\CONFIGURATION]: FILE TYPE=STRING, FILE 
VALUE="False"
COMPARE DIFF: Value "Icon" in 
[HKEY_USER_ROOT\CORE\EXPLORER\FOLDERS\UNXHOST1]: REGISTRY TYPE=STRING, 
CURRENT VALUE="658"
COMPARE DIFF: Value "Icon" in 
[HKEY_USER_ROOT\CORE\EXPLORER\FOLDERS\UNXHOST1]: FILE TYPE=STRING, FILE 
VALUE="343"
Registry COMPARE is now complete.
COMPARE: There were differences between the registry and the file.

This SAS log shows two differences between the SASUSER portion of the registry and the specified external file. In the registry, the value of "Initialized" is "True"; in the external file, it is "False". In the registry, the value of "Icon" is "658"; in the external file it is "343".

Previous Page | Next Page | Top of Page