การสร้าง SAS Macro เพื่อจัดการจำนวนตัวแปรตามอำเภอใจ

%macro meanStat/parmbuff;
%put Syspbuff contains: &syspbuff;
proc means data = sashelp.baseball mean;
var &syspbuff;

%mend meanStat;

%meanStat(hits, runs)`
*indexed list;
VAR var1-var20

*With common prefix;
var var: ; *will select all variables that start with var;

*with general reference;
var _numeric_ ; *runs for all numeric variables;