Google SAS Search

Add to Google

Wednesday, August 26, 2009

SAS Orphaned Workspace

Sometimes SAS doesn't shut down correctly and you get stuck with orphaned workspace. These orphaned workspace directories should be cleaned out now and again. You can run this code in SAS to find out where your workspace is and then go to the directory and delete any old ones.

data _null_;
w = getoption('work');
put w=;
run;


On my windows machine this gets me something like:

w=C:\DOCUME~1\STEPHE~1\LOCALS~1\Temp\SAS Temporary Files\_TD3516


Now I can go to C:\DOCUME~1\STEPHE~1\LOCALS~1\Temp\SAS Temporary Files\ and delete all the old ones.

Note, this is straightforward on a single user machine like my windows laptop, but you have to be more careful in multi-user environments where you don't want to delete active workspaces that others are using.

For multi-user environments like unix there is a utility that SAS provides called cleanwork.

2 comments:

  1. Hi Stephen,
    For SAS 9.2, SAS provides the equivalent of UNIX cleanwork for windows. It is now integrated with the Windows Disk Cleanup utility.

    Information on this utilty can be found in the SAS 9.2 Companion for Windows on the SAS support site:
    http://support.sas.com/documentation/cdl/en/hostwin/61924/HTML/default/a003182430.htm

    Karl Fisher
    SAS R&D
    Cary, NC

    ReplyDelete
  2. Thanks for the info Karl. Looking forward to 9.2.

    ReplyDelete