<?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: how to generate numeric value using  string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-numeric-value-using-string/m-p/510340#M137352</link>
    <description>&lt;P&gt;Numbers are a &lt;U&gt;&lt;STRONG&gt;VERY BAD IDEA&lt;/STRONG&gt;&lt;/U&gt; for primary keys. They are limited by the 8-byte real format, which means that any string longer than ~7 bytes will lose accuracy/precision. Stay with character storage.&lt;/P&gt;
&lt;P&gt;UUID's can be stored reliably as 16-byte strings (use a $hex32. format for display).&lt;/P&gt;</description>
    <pubDate>Mon, 05 Nov 2018 07:38:10 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-11-05T07:38:10Z</dc:date>
    <item>
      <title>how to generate numeric value using  string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-numeric-value-using-string/m-p/510323#M137346</link>
      <description>&lt;P&gt;Hi Expert,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to generate numeric column based on the value&amp;nbsp;a string column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example, my string column can have the value ABC123 then I want to convert this value into a fixed value 123456 using some SAS functions or format like $hex72.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to format the character column using put(column,$hex72.) but it lost precision when I further convert into a numeric column&lt;/P&gt;
&lt;P&gt;input(put(column,$72.)).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reason I want to do this is because our primary key is in character format (ABC123) and I need to generate a numeric primary key&amp;nbsp;to represent each primary key.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2018 04:27:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-numeric-value-using-string/m-p/510323#M137346</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2018-11-05T04:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate numeric value using  string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-numeric-value-using-string/m-p/510330#M137348</link>
      <description>Because abc123 ist not the hex-represantation of 123456, you have to explain the logic you want to use.&lt;BR /&gt;&lt;BR /&gt;If you want to extract numbers from strigs, look at prxmatch or substrate with anydigit.</description>
      <pubDate>Mon, 05 Nov 2018 06:27:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-numeric-value-using-string/m-p/510330#M137348</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2018-11-05T06:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate numeric value using  string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-numeric-value-using-string/m-p/510340#M137352</link>
      <description>&lt;P&gt;Numbers are a &lt;U&gt;&lt;STRONG&gt;VERY BAD IDEA&lt;/STRONG&gt;&lt;/U&gt; for primary keys. They are limited by the 8-byte real format, which means that any string longer than ~7 bytes will lose accuracy/precision. Stay with character storage.&lt;/P&gt;
&lt;P&gt;UUID's can be stored reliably as 16-byte strings (use a $hex32. format for display).&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2018 07:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-numeric-value-using-string/m-p/510340#M137352</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-11-05T07:38:10Z</dc:date>
    </item>
  </channel>
</rss>

