06-30-2011 10:44 AM
I need help in converting variable type from character to numeric. I want to concatenate 3 datasets but I then discover that one variable defined as numeric in 2 of the datasets while it was character in the 3rd datasets. How do i go about this?
06-30-2011 10:58 AM
You can use input function to convert Character values to Numeric values. You may change the informat based on your data.
For e.g. numvar = input(charvar,best.);
06-30-2011 11:36 AM
This post would be better in the SAS Macro, Data Step... Community. This community is for getting started with using Communities, not for getting started with using SAS.
You got your answer, and that's good, but more people would have seen it in the other forum.
06-30-2011 01:39 PM
No offense at all. I saw you hadn't posted before and was offering a suggestion for more effective posting.
There are lots of Forums for posting questions at http://communities.sas.com/index.jspa . The one that is most pertinent to your question is "SAS Macro Facility, Data Step, and SAS Language Elements".
This Forum ("Getting Started: Community Instructions, Usage Tips, and Feedback") is designed for comments and questions about how to use the SAS Communities system itself. Right now, because SAS just moed to this platform, there are a lot of people watching this forum. As people get more comfortable with the process, there are likely to be fewer and fewer people looking at it to be available to answer SAS usage questions.