11-12-2012 11:39 AM
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?
11-12-2012 12:38 PM
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
11-12-2012 12:44 PM
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.
11-12-2012 01:03 PM
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.
11-12-2012 01:19 PM
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.
11-13-2012 02:08 PM
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.
11-22-2012 09:58 AM
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.