The cleanwork utility is your way to go and others have already replied on how it works.
On a side note I would be interested in why your work grows so quickly. In the ideal situation, when SAS terminates in an intended fashion ( a user quits the SAS session; a SAS job end) the work library is deleted automatically. Any residual work locations are due to SAS sessions that end in a less fortunate way because they crash or are killed by some administrative action. If you have many of these this may require some investigation.
Start with checking the value of the WORKTERM option. By default it is WORKTERM; the opposite, NOWORKTERM, will cause your WORK libraries to persist. I have never seen that being the default but you never know. If WORKTERM is the default, dig deeper.
Regards,
- Jan.
... View more