BookmarkSubscribeRSS Feed
jason_253
Calcite | Level 5

Hi,

 

I am wondering whether it is possible to configure my SAS in a way that allows me to double click on a SAS dataset while SAS is closed and get the same current folder (once SAS starts up) as I get when I start SAS by clicking on the icon in my start menu? The latter current folder location is better because that is where my autoexec file is located. Some SAS datasets I work with require specific SAS formats in order to view the contents, and the autoexec file tells SAS where those correct Format Catalogs are located on our network. Otherwise,, I get an error message saying the table cannot be opened.

 

Thanks,

 

Jason

4 REPLIES 4
Reeza
Super User

You probably want to add some automatic libraries or working folder via the configuration file (cfg file). 

 


@jason_253 wrote:

Hi,

 

I am wondering whether it is possible to configure my SAS in a way that allows me to double click on a SAS dataset while SAS is closed and get the same current folder (once SAS starts up) as I get when I start SAS by clicking on the icon in my start menu? The latter current folder location is better because that is where my autoexec file is located. Some SAS datasets I work with require specific SAS formats in order to view the contents, and the autoexec file tells SAS where those correct Format Catalogs are located on our network. Otherwise,, I get an error message saying the table cannot be opened.

 

Thanks,

 

Jason


 

jason_253
Calcite | Level 5

OK, thanks for the response. I'll check that out.

AndrewHowell
Moderator

Jason,

  • What is your "SAS" - PC/SAS on a Windows workstation (presumably), Enterprise Guide, SAS/Studio, SAS University Edition, other? And what version?
  • You want the SAS current folder (SASINITIALFOLDER option?) to be set to the folder containing the data set you double-click on. Or is that the default behaviour after a double-click but you want to override that?

AUTOEXEC defaults first to the current working folder, then the %PATH%, so you can probably "force" a preferred AUTOEXEC by adding to your PATH environment variable.

 

Useful links:

 

Some good forum presentations:

jason_253
Calcite | Level 5

I'm pretty certain I'm using PC/SAS on a Windows workstation, version 9.4. 

 

Yes, it seems like I need a way to override the default behavior after I double click on a file as a means of opening SAS (or starting a session). I am confused as to why the current folder assignment varies depending on how I start up the program. If I start SAS by clicking the icon in my Start menu, the current folder is my C:\Users\JCarr folder (which contains my autoexec file). If I start SAS by double clicking a SAS dataset file sitting one of our network servers, the current folder becomes C:\windows\system32.

 

I'll take a look at those reference documents. Thanks for the help!

 

Jason

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
  • 4 replies
  • 589 views
  • 0 likes
  • 3 in conversation