Hi, I'm sorry to repeat same topic, but i couldn't find in existing "IF-THEN" posted discussions to match my trouble. I have can't figure out very simple scenario with "IF-THEN" statement and log issue "Numeric values have been converted to character values": Here is my code: data have; input type xxtype $ oldvar; cards; 1 num 0 1 num 0 1 num 22 1 num 5 1 num 0 1 num 10 ; run; data want; set have; length check newvar $200; if xxtype="num" then do; check="check1: "||strip(put(type,best12.)); newvar=strip(put(oldvar,best12.)); end; else if xxtype="char" then do; put "type is character=" type; check="check2: "||strip(put(type,best12.)); newvar=strip(oldvar); end; run; Here is log issue: NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column). ELSE statement should never execute, nevertheless it seem SAS is tripping over the newvar=strip(oldvar); line. If I missed very obvious logical fault, I apologize for my silly question.
... View more