Create a data set that contains all of the data sets. The DATA set SummaryM combines all the data sets that were created by the ODS OUTPUT statement. The macro variable list contains the list of data set names.
data summarym; set &list; run;