Hello, our server is filling up quickly with SAS Temp files. While I can go in and delete them manually, I was wondering if anyone has a process that runs to automatically delete files? If so, could you share?
If, by "temporary files", you mean the contents of WORK libraries, then you need to use cleanwork, as already suggested.
But if this happens frequently, you have other problems. WORK library directories are always removed upon graceful completion of SAS sessions, so you have something going on that causes crashes or abnormal termination of SAS sessions. Things like the server going down non-gracefully (where SAS sessions are not "notified" of the immediate shutdown and can terminate on their own), or crashes of the SAS system itself for whatever reasons.
Inquire which SAS sessions leave the data behind, study their logs (you may have to change logging configuration for this).
Educate your users to not simply turn off their computers if they use Enterprise Guide, they should terminate EG before shutting down.
Depending on how busy your server is, I would recommend
- Scheduling a Job to run the cleanwork utility on your server twice or three times a day
Twice: 12:00 PM, 11:30 PM
Note: The Job needs to run under the Privileged System Admin Account, so it would be able to delete other users orphaned temporary files
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.