%macro sssss(dsn1,dsn2);
proc sql noprint;
select name into :namelist separated by ' '
from dictionary.columns
where libname='WORK' and memname=upcase("&dsn1");
%let dim1=&sqlobs;
select name into :namelist2 separated by ' '
from dictionary.columns
where libname='WORK' and memname=upcase("&dsn2");
%let dim2=&sqlobs;
quit;
%put namelist=&namelist namelist2=&namelist2 &dim1 &dim2;
%do i=1 %to &dim2;
%let count=0;
%let word2=%scan(&namelist2,&i);
%do j=1 %to &dim1 %until(&count=1);;
%let word1=%scan(&namelist,&j);
%if &word2=&word1 %then %do;
%put variable &word2 is in &dsn1;
%let count=%eval(&count+1);
%end;
%end;
%if &count=0 %then %put variable &word2 is not in &dsn1;
%end;
%mend sssss;




雷达卡





京公网安备 11010802022788号







