I am trying to load in a large number of data sets that have a similar pattern to their naming in a set statement ie
data output;
set &filenames. ;
I have seen in other questions a method of creating a macro with all of the names using a proc sql statement but I can't seem to figure out how to do this. I was wondering if someone could help me to construct this proc sql code. The naming pattern is something like abcXX03 where abc is common and the XX is changing (ie it can be XX XY or XZ say) but I only want to select the ones with the patern abcXX03. I've tried something like
proc sql;
select memnames into :names
separated by " "
from dictionary.tables
where libname eq "LIBNAME" and
memname like "%XX03"
quit;
based on previous answers.
Use the colon short cut. This will APPEND all the data sets into the same file