Previous Page | Next Page

Tools for the System Administrator

cleanwork Command

Deletes any leftover Work and Utility directories whose associated SAS process has ended.
See Also


cleanwork directory <-n, -hostmatch>


names the directory containing the Work and Utility directories. The name must match the value specified in the WORK system option (which is typically /usr/tmp and contained in the !SASROOT/sasv9.cfg file), or the value specified in the UTILLOC system option.

Note:   Unless cleanwork is run by root, user permissions might prevent you from deleting a directory.  [cautionend]


specifies that SAS list the entries in a directory that can be removed.


specifies the name of a host from which you can remove Work directories that might still be active in a Network File System (NFS).


The cleanwork command deletes any directories that were assigned to the Work data library or directories assigned by the UTILLOC system option. cleanwork deletes only the SAS processes that are on the UNIX system where the SAS session is running. Each SAS process has one of the following formats:




is a 12-character code. The first four characters are randomly generated numbers. The next eight characters are based on the hexadecimal process ID of the SAS session. Processes that are active are not deleted.


specifies the name of the UNIX system where the SAS process is running.

For example, if you are working on nodename jupiter, then the cleanwork command deletes all directories with inactive processes on jupiter. cleanwork does not delete a directory that is associated with an orphaned process if that process is still active. In this case, you need to manually kill the process, and then rerun cleanwork .

See Also

Previous Page | Next Page | Top of Page