02-03-2015 06:33 PM
I have a data set with a variable called Number. Most of the observations have numbers, but those that are missing are "None". When I state that Number is numeric, the SAS Log freaks out saying "Invalid data for Number" each time it encounters "None". When I have Number as a character variable, I can't use any math functions (sum, etc.). How do I tell SAS how to read this variable without the zillions of log errors?
02-03-2015 07:25 PM
input Number ??yournumberformat.;
This will give you . (missing) when 'None', and the error log will be suppressed.
if you want it to be zero instead, you can test _infile_ first, then decide whether to input normally or assign zero value.