BookmarkSubscribeRSS Feed
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:

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


Have a look at the paper 'Tips for Managing SAS® Work Libraries': You may also want to analyze the cleanwork utility and maybe even this paper:
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 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 3 in conversation