Date: Mon, 6 May 2002 15:39:16 -0400
Reply-To: Santosh Verma <santoshkverma@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Santosh Verma <santoshkverma@HOTMAIL.COM>
Subject: How to find missing freq
I have made a program to find missing freq for all var in a large dataset
that contains both character and numeric variables. Character variables are
like address, accident description... So you can not use 'PROC FREQ'
easily. I want to present this to Boston SAS user group but I don't know if
there is a better way of doing this. If any one of you can do it in a
better way please let me know.
value $missfmt ' '='Missing'
value missing . = 'Missisng'
ods output OneWayFreqs = work.oneway;
proc freq data = &data;
tables _all_ / missing;
format _character_ $missfmt.;
format _numeric_ missing.;
proc sort data = oneway; by table;
data misfreq_&data(keep = table misfreq);
if first.table =1 and last.table=0;
rename frequency= misfreq;
proc print data = misfreq_&data;
The only problem with this macro is that you can not give 'noprint' option
in 'Proc Freq' statement.