<?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 char to num in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/char-to-num/m-p/165764#M263707</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;Hello friends,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;i need small help to convert character var to num.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;here is the character var "A" from table "test" that i am trying to convert it into num...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table "&lt;STRONG&gt;test&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;------------&lt;/P&gt;&lt;P&gt;FA09&lt;/P&gt;&lt;P&gt;AA20&lt;/P&gt;&lt;P&gt;1234&lt;/P&gt;&lt;P&gt;3456&lt;/P&gt;&lt;P&gt;8067&lt;/P&gt;&lt;P&gt;7687&lt;/P&gt;&lt;P&gt;AS34&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*if i use below code,*/&lt;/P&gt;&lt;P&gt;data _char_to_num;&lt;/P&gt;&lt;P&gt;set test;&lt;/P&gt;&lt;P&gt;new_a=input(a,4.);&lt;/P&gt;&lt;P&gt;drop a;&lt;/P&gt;&lt;P&gt;rename new_a=a;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*i am getting missing value as "." for couple of values*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;result table "char_to_num"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;----------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1234&lt;/P&gt;&lt;P&gt;3456&lt;/P&gt;&lt;P&gt;8067&lt;/P&gt;&lt;P&gt;7687&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*how can i overcome this issue - please advise*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Jul 2014 20:13:01 GMT</pubDate>
    <dc:creator>woo</dc:creator>
    <dc:date>2014-07-03T20:13:01Z</dc:date>
    <item>
      <title>char to num</title>
      <link>https://communities.sas.com/t5/SAS-Programming/char-to-num/m-p/165764#M263707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;Hello friends,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;i need small help to convert character var to num.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;here is the character var "A" from table "test" that i am trying to convert it into num...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table "&lt;STRONG&gt;test&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;------------&lt;/P&gt;&lt;P&gt;FA09&lt;/P&gt;&lt;P&gt;AA20&lt;/P&gt;&lt;P&gt;1234&lt;/P&gt;&lt;P&gt;3456&lt;/P&gt;&lt;P&gt;8067&lt;/P&gt;&lt;P&gt;7687&lt;/P&gt;&lt;P&gt;AS34&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*if i use below code,*/&lt;/P&gt;&lt;P&gt;data _char_to_num;&lt;/P&gt;&lt;P&gt;set test;&lt;/P&gt;&lt;P&gt;new_a=input(a,4.);&lt;/P&gt;&lt;P&gt;drop a;&lt;/P&gt;&lt;P&gt;rename new_a=a;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*i am getting missing value as "." for couple of values*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;result table "char_to_num"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;----------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1234&lt;/P&gt;&lt;P&gt;3456&lt;/P&gt;&lt;P&gt;8067&lt;/P&gt;&lt;P&gt;7687&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*how can i overcome this issue - please advise*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2014 20:13:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/char-to-num/m-p/165764#M263707</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2014-07-03T20:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: char to num</title>
      <link>https://communities.sas.com/t5/SAS-Programming/char-to-num/m-p/165765#M263708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What numeric value to expect from FA09, AA20 or AS34? The first two could be considered HEX which SAS can read but the last not. If you want to get rid of the letters before the conversion then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;new_a = input(compress(a,'A',' '),4.);&lt;/P&gt;&lt;P&gt;might work which says to replace all alphabetic characters, 'A' code, with spaces ' '&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2014 20:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/char-to-num/m-p/165765#M263708</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-07-03T20:22:23Z</dc:date>
    </item>
  </channel>
</rss>

