SAS 有多种表达缺失值的方法:分为普通缺失值(. " ")或特殊缺失值(.a-.z ._)
设置缺失值:
if age<0 then age=.;
if name="none" then name=' ';
call missing(sales, name); #sets both variable values to a missing value.
检查缺失值:
if numvar=. then do;
if numvar<=.z then do;
#Since .z is the largest of all (numeric) missing values in SAS (._ < . < .a < .b < ... < .z),
#the condition .z < LD is a convenient way to abbreviate not missing(LD)
if charvar=' ' then do;
if missing(var) then do; #The MISSING function enables you to check for either a character or numeric missing value