BookmarkSubscribeRSS Feed
polingjw
Quartz | Level 8
When you open a SAS program (File -> Open Program...), by default, you start looking for the program in the Sasuser directory. Is there a way to change the default behavior by specifying an alternate folder to begin the search?

Thanks!
5 REPLIES 5
polingjw
Quartz | Level 8
Never mind, I figured it out by modifying the config file. Thanks again.
SASPhile
Quartz | Level 8
How is it done?
polingjw
Quartz | Level 8
Enter the following statement at the top of the config file, substituting for the desired directory:

- SASINITIALFOLDER = 'directory'
Bill
Quartz | Level 8
Another way to do this is to add some syntax to the target line in the short cut used to call up SAS (assuming a PC environment). If it's done here, all users can still have the same config file and you don't lose your personal settings in the case of an update or refresh.

"C:\Program Files\SAS\SAS 9.1\sas.exe" -CONFIG "F:\BusinessResults\QSRptsys\Programs\SAS_Other\SASV9.CFG" -set sasfolder "F:\BusinessResults\QSRptsys\Programs" -sasInitialFolder "f:\BusinessResults\QSRptsys\"
Peter_C
Rhodochrosite | Level 12
> Another way to do this is to add some syntax to the
> target line in the short cut used to call up SAS
> (assuming a PC environment). If it's done here, all
> users can still have the same config file and you
> don't lose your personal settings in the case of an
> update or refresh.
>
> "C:\Program Files\SAS\SAS 9.1\sas.exe" -CONFIG
> "F:\BusinessResults\QSRptsys\Programs\SAS_Other\SASV9.
> CFG" -set sasfolder
> "F:\BusinessResults\QSRptsys\Programs"
> -sasInitialFolder "f:\BusinessResults\QSRptsys\"

I think the complexity and length of the demonstration command line shows why and how a config file can help.
Typically I just create my config file overrides file (sasv9.cfg) in the folder where I launch my programs.

When I have control of the start-up command, I remove any -config parameters. Then SAS uses a complex technique to retrieve config files named sasv9.cfg from the folders
1 install folder which holds sas.exe
2 my home folder ( the "my documents" folder on windows )
3 "current folder"

I recommend placing
application specific option settings in the "current folder",
personal preferences (like awstitle) in the "home folder"

There are other places from which SAS will retrieve start-up options and when I can't change the SAS start command, I use any of the alternatives - preference is to set the op.sys system environment (user) variable %sas_options% to
-verbose -config "my_path\my_sasv9.cfg" -config '.\sasv9.cfg'
(-verbose reveals a lot of setup information)

"How SAS Finds and Processes Configuration Files" is documented at http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#a000104286.htm#sea...

peterC

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 2784 views
  • 0 likes
  • 4 in conversation