How to adjust current folder when clicking on SAS dataset to open SAS

Reply
New Contributor
Posts: 3

How to adjust current folder when clicking on SAS dataset to open SAS

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

Super User
Posts: 23,771

Re: How to adjust current folder when clicking on SAS dataset to open SAS

Posted in reply to jason_253

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


 

New Contributor
Posts: 3

Re: How to adjust current folder when clicking on SAS dataset to open SAS

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

Moderator
Posts: 327

Re: How to adjust current folder when clicking on SAS dataset to open SAS

Posted in reply to jason_253

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:

New Contributor
Posts: 3

Re: How to adjust current folder when clicking on SAS dataset to open SAS

Posted in reply to AndrewHowell

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

Ask a Question
Discussion stats
  • 4 replies
  • 60 views
  • 0 likes
  • 3 in conversation