Help using Base SAS procedures

Locating SAS Configuration Files

Accepted Solution Solved
Reply
Contributor
Posts: 28
Accepted Solution

Locating SAS Configuration Files

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


Accepted Solutions
Solution
‎06-16-2015 10:10 AM
Respected Advisor
Posts: 3,777

Re: Locating SAS Configuration Files

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.

View solution in original post


All Replies
Super User
Posts: 6,939

Re: Locating SAS Configuration Files

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

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Solution
‎06-16-2015 10:10 AM
Respected Advisor
Posts: 3,777

Re: Locating SAS Configuration Files

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.

Super User
Posts: 6,939

Re: Locating SAS Configuration Files

I stand corrected.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 28

Re: Locating SAS Configuration Files

Thank you for the response!

Contributor
Posts: 28

Re: Locating SAS Configuration Files

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?

Respected Advisor
Posts: 3,777

Re: Locating SAS Configuration Files

Yes, it can be specified on the SAS command.  See the relevant on-line document at support.sas.com

Super User
Posts: 10,500

Re: Locating SAS Configuration Files

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.

Contributor
Posts: 28

Re: Locating SAS Configuration Files

Thank you, it worked perfectly!

SAS Employee
Posts: 21

Re: Locating SAS Configuration Files

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

New Contributor
Posts: 2

Re: Locating SAS Configuration 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?

New Contributor
Posts: 2

Re: Locating SAS Configuration Files

I just found it!

 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 11 replies
  • 3876 views
  • 4 likes
  • 6 in conversation