经常在执行某些过程时,需要对原始数据集进行筛选,
经常用到的判断条件,例如 where in等等
看看第一个程序:
%macro Filter(ageparm);
%if &ageparm=11 or &ageparm=12 or &ageparm=13
or &ageparm=14 or &ageparm=15 or &ageparm=16
%then %do;
proc print data=sashelp.class;
where age = &ageparm;
title1 “SASHELP.CLASS: Age=&ageparm”;
run;
%end;
%else %do;
%put ERROR: No students with age=&ageparm..;
...........................................
http://crackman.net/?p=1349