To retrieve the filepath of the WORK library, try the following:
%let workpath = %sysfunc(pathname(work)) ;
%put &=workpath ;
This is a useful location to write temporary files, which will be deleted along with the SAS Datasets stored in the directory, at the end of the current session.
Tags: work