Dear all,
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;
thanks,
Lan
If SIC really is a character variable then the note refers to another statement. - PG
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.
Thanks,
Jagadish
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.
Could it also be that SAS is trying to convert the non-blank values in SIC?
Thanks to everyone who replied to my post !!!
SIC was numeric. my mistake. I changed the code IF SIC=. THEN DELETE; it works.
-Lan
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.