SAS
Setup Helps
Change initial SAS Initial
Folder
(sasinitialfolder and SASv9.CFG)
See
www.stattutorials.com/SASDATA
for files mentioned in this tutorial © TexaSoft, 2006
These SAS statistics tutorials
briefly explain the use and interpretation of standard statistical analysis
techniques for Medical, Pharmaceutical, Clinical Trials, Marketing or
Scientific Research. The examples include how-to instructions for SAS
Software.
Setting the initial SAS Folder
I find it helpful
to specify the directory where my SAS program files will be located so I don’t
have to drill through directories to find my files. That is, when I select
File/Open Program from the main menu, I want SAS to open a particular folder…
However, there
doesn’t seem to be a way to easily change this from the SAS program (in
Windows.) Here are two ways you can set this up:
1. The easiest way:
To place the SAS icon on your desktop so you can start SAS with a double-click and to make the C:\ SASDATA folder your default SAS folder to the following.
1. Click on Start/Programs/SAS. Right click on SAS 9.2 (English) and select Send to… Desktop (create shortcut)
2. Go to your desktop and right-click on the SAS 9.2 (English) icon and select Properties.
3. You’ll see the path for SAS in the Target field. Click on this information and move your cursor to the end of the information.
4. Type in the following information after the end of the SAS path information in the Target field (starting with the dash): -sasinitialfolder "C:\SASDATA"
5. Click Apply and OK.
6. When you begin SAS by clicking on the SAS icon, it will use C:\SASDATA as the default folder whenever you open or save files.
2. Not as easy , but more permanent
This brief
tutorial shows at least one way to change (or specify) the default directory
(folder) for SAS.
-
For SAS version 9.13 (I think its
similar for other recent versions) the initial SAS folder is governed by
options in a file called SASV9.CFG. The first thing you have to do is
find that file.
-
Assuming you have a standard
installation, it could be in the folder named C:\PROGRAM FILES\SAS\SAS9.1
(Open this file with notepad – right click on its name and choose Open
with Notepad.)
-
If the file you find in “a” has
only one line in it that looks something like this:
-CONFIG "C:\Program Files\SAS\SAS 9.1\nls\en\SASV9.CFG""
Then SAS is pointing to another folder where the file is located. In this
case, open the SASV9.CFG file in the …\nls\en\ directory (with
notepad.)
-
If you still can’t find it, do
a search (Windows Start/Search)
-
When you’ve found the right
file, it looks something like this:

TIP: I recommend that before you edit this file, you make a copy of it in case
you mess it up… then you can recover to the original file if necessary.
-
Add the following line at the top
of the file (on a line by itself.) Do not change any of the other lines.
-SASINITIALFOLDER
"C:\PATH"
Where “C:\PATH” is the name of the folder that you want to be the initial SAS
folder – don’t forget to put the quotes around the path name.
-
Save the SASV9.CFG file back to
its original location.
-
Start the SAS program can select
File/Open Program to see if your new setting works.