BookmarkSubscribeRSS Feed
DumptyHumpty
Calcite | Level 5

I know how to make datasets and other files in sas work persistant if I have control over the code that is executed on the sas server. Actually this is described in an article that I found, when I was searching for a problem solution: https://communities.sas.com/t5/SAS-Procedures/save-work-file-in-a-permanent-folder/td-p/46339

I'm an administrator of a sas server that executes sas code that is dynamically generated in a web service outside sas. So there is no way for me to inject sas code that copies files from work to a persistant data location. I still have the need to see what is contained in the temporary files for debugging and analysis.
Is there a way to tell sas on a configuration level to keep files in work or copy it to a persistant data location, so that I have access to it after the sas session has ended?

Solutions and ideas for solutions are welcome.

Thanks in advance

Roland

2 REPLIES 2
JosvanderVelden
SAS Super FREQ
Have a look at the paper 'Tips for Managing SAS® Work Libraries': https://support.sas.com/resources/papers/proceedings15/3196-2015.pdf You may also want to analyze the cleanwork utility and maybe even this paper: https://www.lexjansen.com/mwsug/2006/coders/MWSUG-2006-CC01.pdf
Tom
Super User Tom
Super User

Here is a method that will not depend on what the system admins have done.

 

Make sure your code is creating/referencing the "work" files using single level names.  MYDATA instead of WORK.MYDATA.

 

Then you can create a USER libref and SAS will automatically use USER.MYDATA instead of WORK.MYDATA for the single level name MYDATA references.  Or look into the USER= option to use a different libref for the location where you want the single level names to go.

 

 

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 584 views
  • 0 likes
  • 3 in conversation