LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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


Back to: Top of message | Previous page | Main SAS-L page