Please open new threads for new questions in future.
0 is a number
( is not a number
0.0 is a number
) is not a number
To get the two separate numbers then you need two variables, and string parse the string you have:
data abc;
input a $ b $;
c=input(scan(b,"(",1),best.);
d=input(compress(scan(b,"(",2),")"),best.);
data lines;
Normal 0(0.0)
run;
c takes the first number (i.e. the text before the opening bracket) and converts it to numeric using best format.
d takes the second number (i.e. the text after the opening bracket), removes the closing bracket, then converts to number using best format.
I assume this is from clinical outputs where 0 is the count, and 0.0 is the percentage of population, you should be refering to the underlying data, not the produced output!
... View more