Hello,
I have a stored process that creates a number of datasets in the WORK library. I would like the user to be able to navigate through WORK to see the results of each step of the program. Once they close the SAS session, the WORK directory will be cleared as it normally does. My problem is that the SAS Stored Process appears to be killing the contents of WORK before the user even has a chance to look at it. Is there a way to prevent SAS from killing the WORK library contents?
Thanks!
Hi.. why not divert the results to a permanent library .. Any restrictions ?
Also have a look at creating sessions in stored process... they will be useful for your requirement
Hi NN,
Thanks for the response.
I don't want to write to a permanent library because the intermediate datasets are very large (i.e. combined they amount to about 500GB). While I want the user to be able to view the intermediate files, I don't want these files to remain on the server taking up space after they close the session.
I will look in Stored Process Sessions as you suggested -- perhaps I'm just going about this the wrong way entirely.
Thanks!
Well I think you can also consider transient package for results.. but i do doubt the impact that the size of your overall results will have on your application.
Here are a few ideas. None of them is exactly what you asked for, but some of them may form part of a workaround.
Sometimes, file systems contain disk pools that get erased overnight. If you have such a system, you could use that for the WORK libraries.
To save WORK data sets permanently, you don't need to change much. The USER= global option directs the storage location for one-level SAS data set names, and can be set to any defined libname. (The default is USER=WORK.)
Perhaps you could modify the EG steps to output 1,000 observations from each WORK data set to a permanent data set with a matching name.
Perhaps you could add a PROC DATASETS to the workflow, either at the beginning or at the end, to wipe out a permanent library.
Good luck.
You may consider asking the users to Copy the stored process code and execute it in a SAS Program in the Enterprise Guide instead of executing the Stored Process to review the Temporary tables. Any Prompts defined in the Stored process can be handled by the %let statement in the code.
Thank you for all of the great suggestions!
I think my best option is to write the datasets to a permanent scratch drive that would be cleared at the end of every day. I will have to contact IT to set up such a drive.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.