/********************************************************************* Goal: Convert missing values to zeros. Strategy: Test the variable, if the value is missing, then set to zero Related technique: If you don't want/need to change the stored value, then you can use the option MISSING= and have missing values printed as any one character. Documentation: "SAS Language, Reference, Version 6, First Edition" pages 36-37,292-296,763 **********************************************************************/ data test; drop i; input joe harry mike john; array mis{*} joe--john; /* for simplicity if many variables */ do i=1 to dim(mis); /* loop through the array */ if mis{i}=. then mis{i}=0; /* convert . to 0 */ end; cards; . 1 2 3 2 3 4 . . 1 3 4 . . 1 . 1 . 1 . ; proc print;run;