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.)
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.