An easy way to test if the value is a valid representation of a number is to try to convert it to a number.
Just use the normal numeric informat. Use the ?? modifier to suppress error messages.
data want;
set have;
number=input(x,??32.);
valid_number = not missing(number);
run;
Or if you want to accept strings with commas and dollar signs ( like 1,200 and $5,000) then use the COMMA informat instead.
If X can hold strings that are longer than 32 bytes then you might want to also test that the value is not too long.
data want;
set have;
if length(strip(x))<=32 then number=input(strip(x),??32.);
valid_number = not missing(number);
run;