<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: changing ' and &amp;quot; to a numeric variable to calculate total inches = it's a text variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478299#M123352</link>
    <description>&lt;P&gt;Sure …. give a minute to get rid of the personal information. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I said, "thanks," I meant that it worked if I just typed out those heights.&amp;nbsp; I have a huge dataset of about 2 thousand people.&amp;nbsp; I don't have the time to retype it all for an input statement. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jul 2018 07:50:58 GMT</pubDate>
    <dc:creator>mgrzyb</dc:creator>
    <dc:date>2018-07-16T07:50:58Z</dc:date>
    <item>
      <title>changing ' and " to a numeric variable to calculate total inches = it's a text variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478285#M123341</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi. I need some help. I saw another ? that was similar, but it did not work.&amp;nbsp; My goal is to convert a text variable, such as 6'4" into inches (then I can change it to the metric system).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data looks like this - it's a text var.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ht&lt;/P&gt;&lt;P&gt;5'&amp;nbsp; 6"&lt;/P&gt;&lt;P&gt;5'11"&lt;/P&gt;&lt;P&gt;6' 2"&lt;/P&gt;&lt;P&gt;etc. &amp;nbsp; they have different spacings, too.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone could help me, please do so.&amp;nbsp; There are different widths between the feet and inches as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks. Mava&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 05:48:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478285#M123341</guid>
      <dc:creator>mgrzyb</dc:creator>
      <dc:date>2018-07-16T05:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: changing ' and " to a numeric variable to calculate total inches = it's a text variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478287#M123343</link>
      <description>&lt;P&gt;Please try the following code. It may meet your requirement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;input ht $10.;&lt;BR /&gt;datalines;&lt;BR /&gt;5'6"&lt;BR /&gt;5'11"&lt;BR /&gt;6'2"&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data test2(drop=t1);&lt;BR /&gt;set test;&lt;BR /&gt;feet=input(compress(scan(ht,1,"'")),3.);&lt;BR /&gt;t1=index(ht,"'");&lt;BR /&gt;inches=input(compress(scan(substr(ht,t1+1),1,'"')),3.);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output contains feet and inches values in separate variables. Perform numeric operation and add those values as per your requirement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 06:06:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478287#M123343</guid>
      <dc:creator>satya7777</dc:creator>
      <dc:date>2018-07-16T06:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: changing ' and " to a numeric variable to calculate total inches = it's a text variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478289#M123344</link>
      <description>&lt;P&gt;Satya,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you! It works. But it's in a permanent dataset. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So how do I handle that?&amp;nbsp; I have tons of variables and don't know the spacing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know how to handle that for a huge database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works when I copy the data for a separate database = I can always merge it by ID, but there has to be a way to do this using a permanent database.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 06:48:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478289#M123344</guid>
      <dc:creator>mgrzyb</dc:creator>
      <dc:date>2018-07-16T06:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: changing ' and " to a numeric variable to calculate total inches = it's a text variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478291#M123346</link>
      <description>&lt;P&gt;This is the code I have - it's a permanent database.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sayta's pgm helped, but I can't figure it out for a perm. database.&amp;nbsp; It doesn't work unless I copy thousands of ID vars and ht variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My variable for ht is named ht2mg.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data a;&lt;BR /&gt;set aung.try_ht2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data b(drop=ht2mg);&lt;BR /&gt;set a;&lt;BR /&gt;feet=input(compress(scan(ht2mg,1,"'")),3.);&lt;BR /&gt;ht2mg=index(ht2mg,"'");&lt;BR /&gt;inches=input(compress(scan(substr(ht2mg,t1+1),1,'"')),3.);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=b; run;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 06:56:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478291#M123346</guid>
      <dc:creator>mgrzyb</dc:creator>
      <dc:date>2018-07-16T06:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: changing ' and " to a numeric variable to calculate total inches = it's a text variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478293#M123347</link>
      <description>&lt;P&gt;Sorry, can't understand your problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have a dataset named aung.try_ht2 having a variable named ht2mg, containing something in feet and inches (the example data you posted).&amp;nbsp; The code you posted should give you the required result. What do you want as output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT:&lt;/P&gt;
&lt;P&gt;Now i see, you made a small change to the code provided by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/118679"&gt;@satya7777&lt;/a&gt;, you have replaced "t1" with "ht2mg". The log should contain some notes about missing values.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data b(drop=ht2mg);
  set aung.try_ht2;
  feet=input(compress(scan(ht2mg,1,"'")),3.);
  t1=index(ht2mg,"'"); /* was: ht2mg = index.... */
  inches=input(compress(scan(substr(ht2mg,t1+1),1,'"')),3.);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another way to extract numbers from strings is using regular expressions:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set test;

   length feet inches 8 rx 8;
   retain rx;

   if _n_ = 1 then do;
      rx = prxparse(cats("/^(\d+)'", '\s*(\d+)"\s*/'));
   end;
   
   if prxmatch(rx, trim(ht)) then do;
      feet = input(prxposn(rx, 1, trim(ht)), best.);
      inches = input(prxposn(rx, 2, trim(ht)), best.);;
   end;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jul 2018 07:17:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478293#M123347</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-07-16T07:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: changing ' and " to a numeric variable to calculate total inches = it's a text variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478295#M123348</link>
      <description>&lt;P&gt;the feet in a number and inches in a number.&amp;nbsp; I got errors.&amp;nbsp; So I tried this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ODS HTML close; ODS listing ;&lt;BR /&gt;data a (keep= id mrn ht2mg ) out=b;&lt;BR /&gt;set aung.try_ht2;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=b noobs; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data c (drop=t1);&lt;BR /&gt;set b;&lt;/P&gt;&lt;P&gt;feet=input(compress(scan(ht2mg,1,"'")),3.);&lt;BR /&gt;t1=index(ht2mg,"'");&lt;BR /&gt;inches=(compress(scan(substr(ht2mg,t1+1),1,'"')),3.);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=c; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand what the t1 means. &amp;nbsp; I do thank you for your code, but I have thousands to do.&amp;nbsp; I can separate the id and mrn with ht2mg (text var) into a separate database, but is there an easier way?&amp;nbsp; The code above did not work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I got these errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;250&lt;BR /&gt;251&lt;BR /&gt;252 data c (drop=t1);&lt;BR /&gt;253 set b;&lt;BR /&gt;254&lt;BR /&gt;255 feet=input(compress(scan(ht2mg,1,"'")),3.);&lt;BR /&gt;256 t1=index(ht2mg,"'");&lt;BR /&gt;257 inches=(compress(scan(substr(ht2mg,t1+1),1,'"')),3.);&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, ), *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT,&lt;BR /&gt;IN, LE, LT, MAX, MIN, NE, NG, NL, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;258 run;&lt;/P&gt;&lt;P&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;BR /&gt;257:9&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.C may be incomplete. When this step was stopped there were 0 observations and 5 variables.&lt;BR /&gt;WARNING: Data set WORK.C was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 07:21:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478295#M123348</guid>
      <dc:creator>mgrzyb</dc:creator>
      <dc:date>2018-07-16T07:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: changing ' and " to a numeric variable to calculate total inches = it's a text variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478297#M123350</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ODS HTML close; ODS listing ;&lt;BR /&gt;data a (keep= id mrn ht2mg) ;&lt;BR /&gt;set aung.try_ht2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data b (drop=t1);&lt;BR /&gt;set a;&lt;/P&gt;&lt;P&gt;feet=input(compress(scan(ht2mg,1,"'")),3.);&lt;BR /&gt;t1=index(ht2mg,"'");&lt;BR /&gt;inches=(compress(scan(substr(ht2mg,t1+1),1,'"')),3.);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data=b; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My log says this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;326&lt;BR /&gt;327 data b (drop=t1);&lt;BR /&gt;328 set a;&lt;BR /&gt;329&lt;BR /&gt;330 feet=input(compress(scan(ht2mg,1,"'")),3.);&lt;BR /&gt;331 t1=index(ht2mg,"'");&lt;BR /&gt;332 inches=(compress(scan(substr(ht2mg,t1+1),1,'"')),3.);&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, ), *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT,&lt;BR /&gt;IN, LE, LT, MAX, MIN, NE, NG, NL, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;333 run;&lt;/P&gt;&lt;P&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;BR /&gt;332:9&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.B may be incomplete. When this step was stopped there were 0 observations and 5 variables.&lt;BR /&gt;WARNING: Data set WORK.B was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.02 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 07:28:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478297#M123350</guid>
      <dc:creator>mgrzyb</dc:creator>
      <dc:date>2018-07-16T07:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: changing ' and " to a numeric variable to calculate total inches = it's a text variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478298#M123351</link>
      <description>&lt;P&gt;"t1" is just a variable containing the position of the first ' in ht2mg.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post code and log always using {i} or running man icon, to maintain readability.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Still confusing: "I do thank you for your code, but I have thousands to do" - hardly able to understand what you mean.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you post an extract of your data as data-step, so that we can see what you really have?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 07:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478298#M123351</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-07-16T07:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: changing ' and " to a numeric variable to calculate total inches = it's a text variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478299#M123352</link>
      <description>&lt;P&gt;Sure …. give a minute to get rid of the personal information. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I said, "thanks," I meant that it worked if I just typed out those heights.&amp;nbsp; I have a huge dataset of about 2 thousand people.&amp;nbsp; I don't have the time to retype it all for an input statement. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 07:50:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478299#M123352</guid>
      <dc:creator>mgrzyb</dc:creator>
      <dc:date>2018-07-16T07:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: changing ' and " to a numeric variable to calculate total inches = it's a text variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478300#M123353</link>
      <description>&lt;P&gt;I have attached an abbreviated perm data set which includes ht2mg.&amp;nbsp; In the big data set, I have many more variables not in this order, but I can reorder it. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp; I can't seem to attach the perm. data set. It won't accept it. &amp;nbsp; &amp;nbsp; I tried copying it in word, a sas perm data set, but the attachment part will not allow me to attach it!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 08:13:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478300#M123353</guid>
      <dc:creator>mgrzyb</dc:creator>
      <dc:date>2018-07-16T08:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: changing ' and " to a numeric variable to calculate total inches = it's a text variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478301#M123354</link>
      <description>&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data a;&lt;BR /&gt;set aung.partial_dset_mg ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data test2(drop=t1);&lt;BR /&gt;set a;&lt;BR /&gt;feet=input(compress(scan(ht,1,"'")),3.);&lt;BR /&gt;t1=index(ht,"'");&lt;BR /&gt;inches=input(compress(scan(substr(ht,t1+1),1,'"')),3.);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc print data=test2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me.&amp;nbsp; I need this for future use as well. Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 08:20:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478301#M123354</guid>
      <dc:creator>mgrzyb</dc:creator>
      <dc:date>2018-07-16T08:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: changing ' and " to a numeric variable to calculate total inches = it's a text variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478302#M123355</link>
      <description>&lt;P&gt;Hey!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I GOT IT!!!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes!&amp;nbsp; Thank you all!!!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I figured it out.&amp;nbsp; Just had to step away from the computer for a while. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 08:23:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478302#M123355</guid>
      <dc:creator>mgrzyb</dc:creator>
      <dc:date>2018-07-16T08:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: changing ' and " to a numeric variable to calculate total inches = it's a text variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478495#M123401</link>
      <description>&lt;P&gt;Please accept the post that helped you as the solution rather than your own "it works now" post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 21:42:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-and-quot-to-a-numeric-variable-to-calculate-total/m-p/478495#M123401</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-07-16T21:42:01Z</dc:date>
    </item>
  </channel>
</rss>

