%macro clas(data=,);
proc contents data=&data. out=class1 noprint;run;
proc sql noprint;
select name into:name1 separated by " " from class1;
quit;
%if %index(%upcase(&name1.),AGE)=0 %then %put no age here;
/*!!!!!!age不加引号*/
%else %do;
data class2;
set class;
run;
%end;
%mend;
%clas(data=sashelp.class);