cleanwork command

Deletes any leftover Work directories, utility directories, or both, whose associated SAS process has ended.
cleanwork directory<-n, -hostmatch>
directory
names the directory that contains the Work directory, the Utility directory, or both directories. The name must match the value specified in the WORK system option or the value specified in the UTILLOC system option.
Tip:Unless the cleanwork command is run by root, user permissions might prevent you from removing a directory.
-n
specifies that SAS list the entries in a directory that can be removed.
-hostmatch
specifies the name of a host from which you can remove Work directories that might still be active in a Network File System (NFS).
Details
The cleanwork command removes any subdirectories that were assigned to the Work library or directories assigned by the UTILLOC system option. cleanwork removes only those files that are associated with defunct SAS processes. Each subdirectory name has a format of the form:
SAS_workcode_nodename
SAS_utilcode_nodename
code
is a 12-character code. The first four characters are randomly generated numbers. The next eight characters are based on the hexadecimal representation of the process ID of the associated SAS process. Files that are associated with active processes are not removed.
nodename
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 removes all directories with inactive processes on jupiter. cleanwork does not remove 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