Similar to locating the work directory,
%let wrkpath = %sysfunc (pathname(work)); /* returns the fully qualified path of any libref */
%put &wrkpath;;
Is there a command to show me where the SAS configuration file is?
I am having an issue with memory and have been referencing other posts here - I want to type the following command in my SAS configuration file:
options memsize -0;
But I do not know where it is located. I searched *.cfg in my computer and came up with nothing.
Is there a command that will give the path?
Thanks
3 proc options option=config;
4 run;
SAS (r) Proprietary Software Release 9.4 TS1M1
CONFIG=( "C:\SAS\9.4\x86\SASFoundation\9.4\sasv9.cfg"
"C:\SAS\9.4\x86\SASFoundation\9.4\nls\en\sasv9.cfg" )
Specifies the configuration file that is used when initializing or
overriding the values of SAS system options.
I'm afraid that SAS does not remember the path to the config file.
What does your SAS environment look like (single machine, client-server, operating system(s))?
3 proc options option=config;
4 run;
SAS (r) Proprietary Software Release 9.4 TS1M1
CONFIG=( "C:\SAS\9.4\x86\SASFoundation\9.4\sasv9.cfg"
"C:\SAS\9.4\x86\SASFoundation\9.4\nls\en\sasv9.cfg" )
Specifies the configuration file that is used when initializing or
overriding the values of SAS system options.
Thank you for the response!
This worked thank you! Unfortunately I don't have administrative privileges in the current drive. Can I change where SAS looks for the config file?
Yes, it can be specified on the SAS command. See the relevant on-line document at support.sas.com
If you have a desktop shortcut to start sas: (Windows version)
1) copy the shortcut and rename so you can tell which one it is
2) right click on the copied shortcut and go to the Properties menu.
3) the Target line should have a -CONFIG entry, change it to point to the Config file you want to use.
Apply and save the shortcut.
Thank you, it worked perfectly!
There can be multiple config files chained from one to another - this is typical when working in the SAS Platform (Metadata Server, Workspace Server, etc.).
In this case you can use the VALUE option in PROC OPTIONS to know in which config file the option has been set:
proc options option=work VALUE;
run;
And the log says (note the bolded text):
Option Value Information For SAS Option WORK
Value: C:\Users\isreyg\AppData\Local\Temp\SAS Temporary Files\_TD13244_L76025_
Scope: SAS Session
How option value set: Config File
Config file name:
C:\Program Files\SASHome\SASFoundation\9.4\nls\en\sasv9.cfg
It the options exists in multiple config files which are chained together this option shows the last config file used which effectively overrides all the other config files
When I run the code to identify the location of the config file, it points to that folder, but there are only some odd data files and index files there. I opened one, and it did not appear to be a config file. I think the config file is missing. Is there a default one available somewhere?
I just found it!
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.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.