Date: Tue, 9 Mar 2010 04:56:37 -0500
Reply-To: Jim Groeneveld <jim.1stat@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim.1stat@YAHOO.COM>
Subject: Re: Check if a Variable is Null or not
Hi SL,
I would do a PROC FREQ (to an output dataset) on such a variable to see the
available values. If just one value is available and it is missing the
variable name might be removed from a list of variables (in a macro
variable) to present.
I used a strategy like that in a macro to automatically delete all variables
with missing values only from any dataset: DropMV.sas, in:
http://jim.groeneveld.eu.tf/software/SASmacro/DropMV.zip
Regards - Jim.
--
Jim Groeneveld, Netherlands
Statistician, SAS consultant
http://jim.groeneveld.eu.tf
On Mon, 8 Mar 2010 09:56:18 -0800, SAS_learner <proccontents@GMAIL.COM> wrote:
>Hello all,
>
>I can see and check if a dataset is missing or not using something like
>this,
>
>%let dsid=%sysfunc(open(work.test,in));
>%let nobs=%sysfunc(attrn(&dsid,nobs));
>%if &dsid > 0 %then %let rc=%sysfunc(close(&dsid));
>
>if there something similar that to check to see if there is a Variable
>present is Null or not and to Print that variable in Proc Report ??
>
>Thanks
>SL
|