[pre]
* Test data;
data class;
set sashelp.class;
if _n_ in(3,5,7) then call missing(of _character_);
if _n_ in(4,8) then call missing(of _numeric_);
run;
* group data as missing or non-missing;
proc format;
value miss ._-.Z = '2' other='1';
value $miss ' ' = '2' other='1';
run;
* count;
ods listing close;
proc freq data=class;
tables _all_ / missing;
format _character_ $miss. _numeric_ miss.;
ods output oneWayFreqs=OneWayFreqs;
run;
ods listing;
* prepare data for display;
data Report(keep=Var N Nmiss);
length Var $32;
array _ns[2] N Nmiss;
do until(last.table);
set OneWayFreqs;
by table notsorted;
var = scan(table,-1);
_ns(input(vvaluex(var),F1.)) = Frequency;
end;
run;
proc print;
run;
[/pre]