%let Libref = Sasuser; %Let Dsn = fitness; %macro univar1(vars1,id1); * VARS1 = LIST OF VARIABLES; *ID1 = 1 IF QQPLOT; proc univariate; var &vars1; histogram &vars1; %if (&id1 = 1)%then %do; qqplot; %end; %mend univar1; data work; set &libref..&dsn; run; proc print data= work (obs=10) ; run; %univar1(runtime age ,1); run;