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.
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:
[CORE\EXPLORER\MENUS\ENTRIES\CLASS]
[CORE\EXPLORER\NEWMEMBER\CATALOG]
[CORE\EXPLORER\NEWENTRY\CLASS]
[CORE\EXPLORER\ICONS\ENTRIES\LOG]
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
value-name = value-content
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 string double: followed by a numeric value.
a string. You can put anything inside the quotes, including nothing ("").
Note: To include a backslash in the quoted string, use two adjacent backslashes. To include a double quotation mark, use two adjacent double quotation marks.
the string hex: followed by any number of hexadecimal characters, up to the 255-character limit, separated by commas. If you extend the hexadecimal characters beyond a single line, then end the line with a backslash to indicate that the data continues on the next line. Hex values may also be referred to as binary values in the Registry Editor.
the string dword: followed by an unsigned long hexadecimal value.
the string int: followed by a signed long integer value.
the string uint: followed by an unsigned long integer value.
The following display shows how the different types of values that are described above appear in the Registry Editor:
The following list contains a sample of valid registry values:
A double value=double:2.4E-44
A string="my data"
Binary data=hex: 01,00,76,63,62,6B
Dword=dword:00010203
Signed integer value=int:-123
Unsigned integer value (decimal)=dword:0001E240
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.
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:
proc registry listuser startat=' sasuser-registry-key-name '; run;
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.
NOTE: Contents of SASUSER REGISTRY starting at subkey [CORE\ PRINTING\PRINTERS\PostScript\DEFAULT SETTINGS key] Font Character Set="Western" Font Size=double:12 Font Style="Regular" 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