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 (May 2003, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 21 May 2003 00:50:15 +0000
Reply-To:   sashole@bellsouth.net
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Paul Dorfman <paul_dorfman@HOTMAIL.COM>
Subject:   Re: Best way to test missing value?
Comments:   To: yhuang@AMYLIN.COM
Content-Type:   text/plain; format=flowed

Ya,

The last time I tested the data-type-independent MISSING() function I was surprised to discover that it performed noticeably faster than the condition ( LE .Z ) despite the fact that the latter seemingly had less work to do. So, I would follow Jack's advice and use MISSING() under all circumstances where all the missing values have to be embraced collectively.

Kind regards, ================== Paul M. Dorfman Jacksonville, FL ==================

>From: "Huang, Ya" <yhuang@AMYLIN.COM> > >Hi there, > >I usually use "if a=. then ..." to test if a variable's value is >missing, but was burned today, because one of the var has many different >missing values, as a result "if a=. then .." failed to detect a=.k. >I then use "if nmiss(a)=1 then ..", which works fine. I just wonder >how you guys handle this kind of situation. > >61 data _null_; >62 a=.; >63 b=(a=.); >64 put a= b=; >65 a=.k; >66 b=(a=.); >67 put a= b=; >68 a=.k; >69 b=(nmiss(a)=1); >70 put a= b=; >71 a=.k; >72 b=(a = missing); >73 put a= b=; >74 run; > >NOTE: Variable missing is uninitialized. >a=. b=1 >a=K b=0 >a=K b=1 >a=K b=0 > >I vaguely remember seeing someone use 'missing' as a key word, >but the above log shows it dose not work. > >Thanks > >Ya

_________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail


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