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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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