DATA Step, Macro, Functions and more

Changing default output location when dragging sas files to windows editor

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 13
Accepted Solution

Changing default output location when dragging sas files to windows editor

Objective: Drag programming files from Windows file manager to the enhanced editor and execute without creating default output files in the directory from which I dragged my programming code. I am using SAS 9.4 (64-bit).

 

Rambling: I assume this has something to do with creating some directory specific modification of the sas9.cfg file but the details elude me. Identifying the "correct" community to post this request also eludes me. Thank you for your patience.

 


Accepted Solutions
Solution
‎09-22-2016 03:34 PM
Super User
Super User
Posts: 7,401

Re: Changing default output location when dragging sas files to windows editor

I would suggest then that you need an autoexec.sas file in the location where the programs are.  This file is loaded as SAS is started (from any location) and sets up default locations and links.

http://support.sas.com/documentation/cdl/en/hostunx/63053/HTML/default/viewer.htm#p13flc1vsrqwr8n1vu...

View solution in original post


All Replies
Occasional Contributor
Posts: 13

Re: Changing default output location when dragging sas files to windows editor

More specifically, I know how to direct output but additional html files are being saved to my project directory and I don't seem to be able to control that.

Super User
Super User
Posts: 7,401

Re: Changing default output location when dragging sas files to windows editor

Sorry, I have never encountered this behaviour.  Have you tried File->Open from within SAS?  Its hard to emulate this, my SAS is virtual.  What "HTML" files are you talking about, are these files you create, maybe you haven't specified a path, and SAS is redirecting them to its temp area - which may in turn be defaulted to the file open area - this is the behaviour in Batch SAS, but normally when interactive SAS is started up a temporary area is created by the system, so this doesn't happen with interactive SAS.  

Super User
Posts: 10,497

Re: Changing default output location when dragging sas files to windows editor

Is this using Enterprise Guide?

I believe that drag-and-drop behaves differently between Base SAS and EG.

Occasional Contributor
Posts: 13

Re: Changing default output location when dragging sas files to windows editor

Sorry, but I misspecified the problem. A corrected objective follows:

 

Objective: Double clicking files in the Windows file manager to start SAS with the program files loaded to the enhanced editor sends default output files to the directory where I am storing my programming code. I would like for those output files to go elsewhere, preferably someplace where they are automatically deleted after use. I am using SAS 9.4 (64-bit).

 

Potential Solution: Use the following code in my programs:

ods html path="C:\Users\[WINDOWS USER NAME]\Downloads";

 

Rambling: Trying to explain a problem to someone else is a wonderful way to concentrate the mind.

 

Solution
‎09-22-2016 03:34 PM
Super User
Super User
Posts: 7,401

Re: Changing default output location when dragging sas files to windows editor

I would suggest then that you need an autoexec.sas file in the location where the programs are.  This file is loaded as SAS is started (from any location) and sets up default locations and links.

http://support.sas.com/documentation/cdl/en/hostunx/63053/HTML/default/viewer.htm#p13flc1vsrqwr8n1vu...

Occasional Contributor
Posts: 13

Re: Changing default output location when dragging sas files to windows editor

Thank you for the autoexec.sas suggestion though it’s not immediately obvious to me as to how I set the default output/html location that way. However, after scanning through sasv9.cfg, it looks like “!TEMP\SAS Temporary Files” is a good place to direct output I don’t want to save… as long as there aren’t any unintended consequences. It’s the default location of the SAS “work” directory under Windows.

Occasional Contributor
Posts: 13

Re: Changing default output location when dragging sas files to windows editor

Silly me, I was looking for something more dramatic. The sole contents of my autoexec.sas file are as follows:

ods html path="!TEMP\SAS Temporary Files";

☑ This topic is SOLVED.

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

Discussion stats
  • 7 replies
  • 540 views
  • 3 likes
  • 3 in conversation