BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Chuck_White
Obsidian | Level 7

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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

7 REPLIES 7
Chuck_White
Obsidian | Level 7

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.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.  

ballardw
Super User

Is this using Enterprise Guide?

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

Chuck_White
Obsidian | Level 7

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.

 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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...

Chuck_White
Obsidian | Level 7

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.

Chuck_White
Obsidian | Level 7

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";

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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