HI All, Here is my scenario - I am using proc import , which will set the datatype based on its content , hence I have taken a copy of dataset using 'set' and tried to convert the datatype using only if it satisfies my 'if logic', but it seems still goes in to the if condition even though it doesn't satisfy my condition . Below sample code , please help out how can I fix this . Note: variable inside if not supposed to be created as it doesn't pass the criteria .. data A;
infile cards dlm=',' missover;
input name : $32. age $ ;
cards;
hawking ,20
einstein , 40
carl sagan , 30
;
run;
data dummy;
set A;
if vtype(age) = 'N' then do ;
age_1 = input(age,best.) ;
end;
run;
... View more