Base SAS 9.1 Procedures Guide, Volumes 1, 2, 3 and 4

Structure of a Registry File

You can create registry files with the SAS Registry Editor or with any text editor.

A registry file must have a particular structure. Each entry in the registry file consists of a key name , followed on the next line by one or more values. The key name identifies the key or subkey that you are defining. Any values that follow specify the names or data to associate with the key.

Specifying Key Names

Key names are entered on a single line between square brackets ([ and ]). To specify a subkey, enter multiple key names between the brackets, starting with the root key. Separate the names in a sequence of key names 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 backslashes). Key names can contain any character except the backslash.

Examples of valid key name sequences follow. These sequences are typical of the SAS registry:

Specifying Values for Keys

Enter each value on the line that follows the key name that it is associated with. You can specify multiple values for each key, but each value must be on a separate line.

The general form of a value is

A value-name can be an at sign (@), which indicates the default value name, or it can be any text string in double quotation marks. If the text string contains an ampersand (&), then the character (either uppercase or lowercase) that follows the ampersand is a shortcut for the value name. See Sample Registry Entries on page 853.

The entire text string cannot contain more than 255 characters (including quotation marks and ampersands). It can contain any character except a backslash (\).

Value-content can be any of the following:

The following display shows how the different types of values that are described above appear in the Registry Editor:

Display 42.1: Types of Registry Values, Displayed in the Registry Editor

The following list contains a sample of valid registry values:

Sample Registry Entries

Registry entries can vary in content and appearance, depending on their purpose. The following display shows a registry entry that contains default PostScript printer settings.

Display 42.2: Portion of a Registry Editor Showing Settings for a PostScript Printer

To see what the actual registry text file looks like, you can use PROC REGISTRY to write the contents of the registry key to the SAS log, using the LISTUSER and STARTAT= options:

Example Code 42.1: SAS code for sending a SASUSER registry entry to the log

proc registry listuser startat=' sasuser-registry-key-name '; run;

 

Example Code 42.2: SAS code for sending a SASUSER registry entry to the log

proc registry listuser startat='HKEY_SYSTEM_ROOT\CORE\PRINTING\PRINTERS\PostScript\DEFAULT SETTINGS'; run;

 

For example, the list below begins at the CORE\PRINTING\PRINTERS\PostScript\DEFAULT SETTINGS key.

Output 42.1: Log Output of a Registry Entry for a PostScript Printer

NOTE: Contents of SASUSER REGISTRY starting at subkey [CORE\ PRINTING\PRINTERS\PostScript\DEFAULT SETTINGS key] Font Character Set="Western" Font Size=double:12 Font Font Typeface="Courier" Font Weight="Normal" Margin Bottom=double:0.5 Margin Left=double:0.5 Margin Right=double:0.5 Margin Top=double:0.5 Margin Units="IN" Paper Destination="" Paper Size="Letter" Paper Source="" Paper Type="" Resolution="300 DPI" NOTE: PROCEDURE REGISTRY used (Total process time): real time 0.03 seconds cpu time 0.03 seconds

 

Категории