|
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
|