Hello Everybody, I am trying to create a macro so that I can check distribution of each of the variable of the given dataset. Here is my basic query. PROC CONTENTS DATA=test VARNUM OUT=NAME;RUN; DATA NAME; SET NAME; ID = _N_; RUN; PROC SQL; SELECT NAME,ID INTO :VARNAME,:NUMVAR FROM WORK.NAME; QUIT; %macro dist(dsname = ,varname=); PROC FREQ DATA=&dsname; tables &varname/list missing out=&varname._dist; run; %mend; %dist(dsname=test,varname=var1); %dist(dsname=test,varname=var2); %dist(dsname=test,varname=var3); in macro %dist I have type all the variable names if I want to see the distribution of variables. I am wondering if we can incorporate &varname macro with in %dist macro so that it would iterate macro %dist for all the variables in test data. I am aware that it can be time and system consuming for larger tables. Thank you
... View more