Sandy, I am puzzeld what your intention is. Because: - The SASwork will get random names normally (windows) below the %temp% user environment. This area will be cleaned up when SAS normally stops. The Windows clean up should be extended at installation time to clean up left rubbish of abended processes. Are you a Windows admininstrator the user %temp% should be cleaned regular in generic as of possible leaking data. This is normally not c:\temp as Windows has become a multi-user OS. - If your problem is cleaning up SASwork as part of your logical processing the best way is use the SAS facilties, as there are; Base SAS(R) 9.4 Procedures Guide (PROC DATASETS) with kill all or delete a selection of the datasets. With 9.4 the Base SAS(R) 9.4 Procedures Guide the delete procedure is added to make this easier. If you would prefer SAS(R) 9.4 SQL Procedure User's Guide PROC SQL you have drop table. - There are a lot more SAS statements to access and maintain OS files bypassing all X statement requitement of batch scripting. This is one of the oldest parts of SAS and mostly got hiddem in all datastep processing capabilities and fucntions. An handy one is the SAS(R) Component Language 9.4: Reference pathname function. Returning the physical name of a logical one, like SASwork SASuser. - Just wanting to cleanup SAS-datasets or files like using Windows-Explorer? All is possible with SAS Explorer and the Eguide file-list. Just use the mouse. - There are situations to imagine an OS scritp is giving advantages, That is when there are no SAS functions/logic and/or needing specific features of the OS like Xcacls (security administration). As said the SASuser is the standard for the personal settings. Sometimes it is used to drop all kind of data in it because of missing conventions where the data should be stored. Sometimes it is used for samples and educational files. @Tom, normally the SASuser in a WS / SP is set as readonly (the -rsasuser option) as being set up to run to server multiple processes. The only exception with that is the DMS base-sas approach as the only one knowing he is starting a second one or not, is the operator. The operator, that is the person starting SAS, the sas-user.
... View more