Hi,
This is not an ODS question or a BASE Reporting procedure question.
What you want to do can probably be accomplished with the use of SAS Macro programming and several possible methods, which include, but are not limited to using functions that check for data set existence or using the dataset dictionary.tables (assuming that you have issued a LIBNAME statement), or even piping the results of a DIR command to a file and then building the LIBNAME statement and DATA step program dynamically with SAS Macro.
Your best bet for help with this question is to contact Tech Support and/or to search for other papers like this one:
http://www2.sas.com/proceedings/sugi31/029-31.pdf
that show the kind of techniques you would need to use.
cynthia