11-02-2013 10:19 PM
I have a character variable SIC with some missing values. I used the script (see below) to eliminate those observations and the sas log says "Character values have been converted to numeric values at the places given by...:"
IF SIC=" " THEN DELETE;
My question: do I need to convert SIC into numeric before using IF SIC=" " THEN DELETE;
11-03-2013 01:08 AM
i agree with PG,
The chances of note mentioned will arise when the sic variable data is character and you are considering it as numeric data while deleting. something like below
if sic=. then delete. However as per your post, it is a character and you have used the right statement.
Check if there are any other variable which is character and you are trying to delete those records considering the data is numeric.
11-04-2013 10:29 AM
The log should have reported line numbers and number of times. Look at the code with that line number in the log.
I'll bet you've done a numeric function such as adding, subtracting or mulitplying with a variable you thought was numeric but is actually character.
11-04-2013 12:00 PM
Thanks to everyone who replied to my post !!!
SIC was numeric. my mistake. I changed the code IF SIC=. THEN DELETE; it works.