libname a 'd:\';
data a.m;
x=1;
run;
data a.n;
x=1;
run;
%macro ds_union(libnm);
proc sql;
create table dict_dsnm(where=(libnm=upcase("&libnm."))) as select distinct
memname as dsnm, libname as libnm
from dictionary.members where memtype='DATA';
select count(distinct dsnm) into :ds_n from dict_dsnm;
quit;
%do i=1 %to &ds_n.;
data dsnm;
set dict_dsnm;
if _N_=&i.;
call symput('dsnm',dsnm);
run;
data ds;
set &libnm..&dsnm;
length type $50;
type='&dsnm.';
run;
data dsnm;
set &libnm..&dsnm.;
length type $50;
type="&dsnm.";
run;
proc append base=ds_union data=dsnm force; quit;
%end;
%mend ds_union;
%ds_union(a);


雷达卡




京公网安备 11010802022788号







