Chapter Contents |
Previous |
Next |
SAS Companion for the Microsoft Windows Environment |
The SAS System uses many files while it is running; however, some of these files are especially important from a user's perspective. These files include the
SAS Configuration Files |
The SAS configuration file enables you to specify SAS system options that are used to establish your SAS session. These system options indicate, among other things, the location of your SAS System help and message files and the paths to SAS executable files. The SAS configuration file is particularly important because it specifies the folders that are searched for the various components of SAS products. You must have at least one configuration file in order for the SAS System to initialize; you can have multiple configuration files that are all processed while your SAS session begins. For a list of system options you can use in your SAS configuration file, see Summary of System Options for Windows. For more information about system options, see the section on SAS system options in this document and in SAS Language Reference: Dictionary.
A default SAS
configuration file named SASVx.CFG
(x is the version number of the SAS System) is created during
the installation process and is stored in the !SASROOT folder. (The !SASROOT
folder is the folder in which you install the SAS System. For more information
on the !SASROOT folder, see SAS Default Folder Structure.)
The SAS System requires a configuration file, so you must use a SAS configuration
file regardless of whether you are using interactive or batch mode.
You can specify any SAS system option in the SAS command when you start the SAS System. However, it is generally more convenient to place frequently used system options in your SAS configuration file rather than repeatedly specifying the same options at invocation. The syntax for specifying system options in the SAS configuration file is discussed in Syntax for System Options in the SAS Invocation or SAS Configuration File.
You can edit the default configuration file to add to or change the system option settings, or you can create your own SAS configuration file. Naming Conventions for the SAS Configuration File discusses how to modify your SAS configuration file.
Your SAS configuration file is divided into two sections. The first section specifies system options that are not updated by the SAS System Setup application. The second section is used by the SAS System Setup application for updating information about where SAS software is installed. The sections are divided by the following text string:
/* DO NOT EDIT BELOW THIS LINE - INSTALL */ /* application edits below this line */
The SAS System Setup application deletes all data below this text string but does not affect the options specified above it. The Setup application appends the following system options below this text string: DMSEXP, DOCLOC, HELPLOC, MAPS, MSG, PATH, SASHELP, SASUSER, WORK, and SET. (The SET system option defines the following SAS environment variables: SASAUTOS, SASCFG, SASFOLDER, SASROOT, INSTALL, SAMPSIO, SAMPSRC, and SASEXT0).
You can specify your own file to act as the SAS configuration file, overriding the default file, SASV8.CFG. When you use a file located in a different place or under a different name as your default SAS configuration file, you must tell the SAS System where to find the configuration file. For example, the Target field of the SAS System properties might contain:
C:\SAS\SAS.EXE -CONFIG C:\SAS\MySASConfig.CFG
If the SAS System cannot find the SAS configuration file, an error message is displayed, and the SAS System does not initialize.
For more information about the CONFIG system option, see CONFIG.
Order of Processing for SAS Configuration Files
SAS Autoexec File |
-AUTOEXEC C:\MySASFiles\INIT.SASIf the specified SAS autoexec file is not found, an error message is displayed, and the SAS System terminates.
The SAS autoexec file is a convenient way to execute a standard set of SAS program statements each time you invoke the SAS System. You may want to include OPTIONS, LIBNAME or FILENAME statements, or any other SAS statements and system options you want the system to execute each time you invoke a SAS session. For example, if you want to specify a script file for SAS/CONNECT software, you can place the following statement in the AUTOEXEC.SAS file:
filename rlink 'c:\sas\connect\saslink\vms.scr';
Or you can use the OPTIONS statement to set the page size and line size for your SAS output and use several FILENAME statements to set up filerefs for commonly accessed network drives, as in the following example:
options linesize=80 pagesize=60; filename saledata 'f:\qtr1'; filename custdata 'l:\newcust'; filename invoice 'o:\billing';
Other system options, in addition to the AUTOEXEC system option, provide ways to send the SAS System information as it is starting up. These options are listed below in the order in which they are processed:
For
more information about the CONFIG, AUTOEXEC, and
SYSIN system options, see SAS System Options under Windows.
For more information about the INITCMD and INITSTMT system options, see SAS Language Reference: Dictionary.
C:\SAS\SAS.EXE -NOAUTOEXEC
Profile Catalog |
Use the SASUSER system option to specify a location for the profile catalog other than the default (which is a folder named \My SAS Files\V8). This option is useful if you want to customize your SAS sessions when sharing a machine with other users or if users are accessing the SAS System from a network.
The SASUSER system option takes the following form:
-SASUSER ("library-specification") |
Note: Parentheses () are use to specify multiple library-specifications, and
quotes (") are used when special
characters are used in the library-specification.
If library-specification (which specifies a valid Windows pathname) does not exist, the SAS System attempts to create it. For example, if you specify the following option, a profile catalog is created in a folder named MYUSER that resides in the root folder of the C: drive:
-sasuser c:\myuser
Note: The default configuration file for the SAS System specifies the SASUSER system option as follows:
-sasuser c:\My Documents\My SAS Files\V8\
-sasuser !USERPROFILE\Personal\My SAS Files\V8\
The profile catalog is not recreated if it already exists. Any customizations (such as key definitions or color modifications) defined during subsequent sessions are stored in your profile catalog in the specified folder.
When you delete your profile catalog, you lose the key definitions, window configurations, and option settings that you might have defined, as well as any other entries that you saved to your profile catalog. In addition, any text that you stored in NOTEPAD windows is erased. For this reason, it is a good idea to make a backup copy of your profile catalog after making significant modifications to your SAS session settings.
For more information about the SASUSER system option, see SASUSER.
WORK Data Library |
The SAS System requires some temporary disk space during a SAS session. This temporary disk space is called the WORK data library. By default, the SAS System stores SAS files with one-level names in the WORK data library, and these files are deleted when you end your SAS session. You can change the data library in which SAS files with one-level names are stored. For more information, see Using the USER Libref.
The WORK system option controls the location of the WORK data library. You can specify the WORK option in your SAS configuration file or when you invoke the SAS System. Usually, you use the WORK option specified in the default configuration file.
The default configuration file for the SAS System specifies the WORK system option to be a folder in your system's designated temporary area (as defined by the TEMP environment variable). For example:
-work "C:WIN95\TEMP\SAS Temporary Files"
-work "C:WIN98\TEMP\SAS Temporary Files"
!TEMP\SAS Temporary Files
. To determine TEMP environment variable,
refer to the System Properties dialog box that you access from the Control
Panel.
Because you can run multiple SAS sessions at one time, the SAS System creates temporary subfolders under the folder you specify with the WORK option. These temporary subfolders are created in the unique form #TDnnnnn, where TD means temporary folder and nnnnn is the process ID for each SAS session. These subfolders enable multiple SAS sessions to be invoked using the same configuration file, and they prevent the WORK folder from being shared. The SAS System creates any temporary files required within each temporary folder. As with all temporary files that are created in the WORK data library during a SAS session, these temporary folders are deleted when you end the SAS session. However, if for some reason the SAS session ends abnormally, these temporary files are not deleted.
If you do not want the SAS System to create a temporary subfolder under the specified WORK folder, but would rather use the actual folder specified in the WORK system option, specify the USE suboption in the WORK option. For example, you can specify the following in the Target field of the SAS System properties:
-work "C:\TEMP\SAS Temporary Files" use
This creates a folder called "C:\TEMP\SAS Temporary Files" and all temporary SAS files are stored in this folder, not in a subfolder.
For more information about using the WORK data library and overriding the default location, see Using the WORK Data Library.
If the SAS System terminates abnormally, determine if the WORK library was deleted. If not, remove it by using Windows commands.
Note: Do not attempt to delete the WORK folder while
the SAS System is running.
If you want to verify the location of the current WORK folder, it is displayed in the current folder area of the status line. You can also verify the location of the current WORK folder by opening the Libraries folder in the SAS Explorer window and then click the right mouse button on the WORK folder. Select Properties from the pop-up menu and then click on the down arrow to see the location of the WORK folder.
SAS Registry Files |
SAS Default Folder Structure |
The root folder of the SAS System is the folder in which
you install the SAS System. Within SAS, this folder has the logical name !SASROOT.
In many installations, the real physical name of this folder is
SAS\V8
, but
this is not required. (The examples in this document assume the !SASROOT folder
is called SAS\V8.)
One important subfolder of the !SASROOT folder is the CORE subfolder. The CORE subfolder in turn contains many subfolders, three of which are described here:
For each SAS product installed, the following subfolders might be created (but not all products contain all of these folders):
Some products, such as SAS/CONNECT software, also have other subfolders associated with them. For details about each product's structure, see the specific SAS product documentation.
For more information about how the SAS folders are configured at your site, contact your SAS Support Consultant.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.