HI RW9, Here is a sample data set. I have >100 variables, but I am interested only total count of positive, negative, 0 and missing values for each numeric variable. data test; input var1 var2 var3 var4 $ var5 $; datalines; 1 2 3 a d 1 4 1 b d -2 3 -1 c d . -1 2 d d . . . . d 0 0 0 ed d ; /*create the new coding based on the values */; data new; set test; array Nums{*} _numeric_; do i=1 to dim(Nums); if Nums[i]=. then Nums[i]=.; else if Nums[i]<0 then Nums[i]=-1; else if Nums[i]=0 then Nums[i]=0; else if Nums[i]>0 then Nums[i]=1; end; run; /* proc contents for data set */; proc contents data=new varnum out=test2 (keep=name Type); run; proc sql; create table OutputData_vars_num as select Name from test2 where type=1 and Name not in ("i"); quit; proc print data=OutputData_vars_num; run; options symbolgen mlogic mprint; Proc sql; Select strip(put (Count(name), 3.)) into :varcount_num from OutputData_vars_num; quit; /* create macro for numeric variables */; Proc sql; Select Name into :y1 - :y&varcount_num from OutputData_vars_num; quit; /* do loop create each freq tables */; %macro summary; %do i=1 %to &varcount_num; proc freq data=new; tables &&y&i/list out=out&&y&i; run; %end; %mend; %summary Now a big thing is to append the tables from all the freq tables, and please, let me know if you have any ideas about it. Proc tabulate is good for few variables, it would be ugly if the data set has tons of variables. Thanks, Bikash
... View more