07-04-2013 02:47 PM
I looked around and I found a few suggestions such as https://communities.sas.com/thread/30121?start=0&tstart=0. However, I have a slightly different scenario and I cannot figure it out by myself.
The observations are saved in a SAS dataset in one char variable like 5' 10, 6' 4" ... etc. The problem I ran into most of the time were unbalanced quotation marks.
The final goal is it to convert the data into a numeric value (total inches or cm) to open it up for numeric procs for better analysis.
Any suggestions are very much appreciated!bas
07-04-2013 03:26 PM
Use KSharp's solution from the tread above but change your scan options, to reflect your data.
Probably work on getting the scan to work properly first is a good place to start.
07-04-2013 04:40 PM
If the data consistently includes FEET value then you could use something like this:
input charvar $10.;
inches = sum
put (inches charvar) (=);
inches=68 charvar=5' 8"