10个的话还是一个个输吧,你问问题这点工夫都写完了,如果有100个的话,写个宏会简单一点
宏程序
proc sql;
select distinct("a."!!memname) into:list separated by " " from dictionary.columns
where libname="A";
quit;
data a;
set &list;
run;
data _null_;
set sashelp.vtable end=last;
where libname=upcase("&libname");
if _n_=1 then call execute("data a; set ");
call execute("&libname.."||strip(memname));
if last then call execute("; run;");
run;