The way you are creating your input file will get you the wrong results. You have to add an ampersand on your input statement.
However, that said, try the following:
data have;
input var $ &;
cards;
23,32
12.32
32 42
23ab
$23
123
;
run;
data want errors;
set have;
if notdigit(strip(var)) then output errors;
else output want;
run;