Add functionality to enable data hiding for data sets within SAS macro definitions, such that data sets could be created in a macro in a temporary directory that isn't the work directory, which would disappear when the macro stops running. This would avoid the problem of macros overwriting data sets already in the work directory.
One way to do this would be to add the capability for users to create and clear additional temporary libraries which function in the same way as the work library.
libname localMac type=temp; /*Note that library localMac is a temporary library like the work library, but is separate from the work library*/
/*Lots of code that creates a bunch of data sets in localMac library*/
/*Pass final result of code above, a data set named Dorothy, back to work library*/