<?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 Converting character to numeric value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541438#M149481</link>
    <description>Hi,&lt;BR /&gt;I am trying to convert a character variable to numeric but when I use input function it is returning me the numeric value in scientific notation. Is there a way I can get a proper value ?&lt;BR /&gt;I am using the input function as below&lt;BR /&gt;acct_id=input(accountid, 20.);&lt;BR /&gt;&lt;BR /&gt;I tried the best32. informat. It still returns in the same format with scientific notation like 4.9975044E14&lt;BR /&gt;The original format/informat of the accountid shows $15.&lt;BR /&gt;&lt;BR /&gt;Any help that will help me get the proper value will be appreciated. Thanks</description>
    <pubDate>Fri, 08 Mar 2019 15:49:48 GMT</pubDate>
    <dc:creator>nickspencer</dc:creator>
    <dc:date>2019-03-08T15:49:48Z</dc:date>
    <item>
      <title>Converting character to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541438#M149481</link>
      <description>Hi,&lt;BR /&gt;I am trying to convert a character variable to numeric but when I use input function it is returning me the numeric value in scientific notation. Is there a way I can get a proper value ?&lt;BR /&gt;I am using the input function as below&lt;BR /&gt;acct_id=input(accountid, 20.);&lt;BR /&gt;&lt;BR /&gt;I tried the best32. informat. It still returns in the same format with scientific notation like 4.9975044E14&lt;BR /&gt;The original format/informat of the accountid shows $15.&lt;BR /&gt;&lt;BR /&gt;Any help that will help me get the proper value will be appreciated. Thanks</description>
      <pubDate>Fri, 08 Mar 2019 15:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541438#M149481</guid>
      <dc:creator>nickspencer</dc:creator>
      <dc:date>2019-03-08T15:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541443#M149484</link>
      <description>&lt;P&gt;You're getting the right value originally.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is with formatting.&amp;nbsp; Add:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format acct_id 15.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That should display ACCT_ID without scientific notation (assuming, as you say, that values are limited to 15 digits).&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 15:53:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541443#M149484</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-03-08T15:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541444#M149485</link>
      <description>&lt;P&gt;I don't see any possible reason why you'd want to convert ACCT_ID to a number anyway. You don't need it to be numeric, there's no such thing as performing arithmetic on an ACCT_ID, for example, to find the average ACCT_ID.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 16:12:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541444#M149485</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-08T16:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541455#M149489</link>
      <description>&lt;P&gt;If your character accountid does have more than 15 digits, you must not do that, as you will lose precision in the conversion.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 16:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541455#M149489</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-08T16:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541526#M149524</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/206798"&gt;@nickspencer&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi,&lt;BR /&gt;I am trying to convert a character variable to numeric but when I use input function it is returning me the numeric value in scientific notation. Is there a way I can get a proper value ?&lt;BR /&gt;I am using the input function as below&lt;BR /&gt;acct_id=input(accountid, 20.);&lt;BR /&gt;&lt;BR /&gt;I tried the best32. informat. It still returns in the same format with scientific notation like 4.9975044E14&lt;BR /&gt;The original format/informat of the accountid shows $15.&lt;BR /&gt;&lt;BR /&gt;Any help that will help me get the proper value will be appreciated. Thanks&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please tell us what you expect to do with a numeric version of the account id that you cannot do with a character version.&lt;/P&gt;
&lt;P&gt;Please.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 18:47:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541526#M149524</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-08T18:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541534#M149527</link>
      <description>I am trying to load this data into a teradata table but for some reason it has the column as numeric</description>
      <pubDate>Fri, 08 Mar 2019 18:59:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541534#M149527</guid>
      <dc:creator>nickspencer</dc:creator>
      <dc:date>2019-03-08T18:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Converting character to numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541546#M149534</link>
      <description>&lt;P&gt;Maybe for space reasons. DB systems usually use 8 bytes for numbers, like SAS, so you save can 7 bytes.&lt;/P&gt;
&lt;P&gt;As long as you can be sure that you never have more than 15 digits, you can store that reliably as a number.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 19:27:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-character-to-numeric-value/m-p/541546#M149534</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-08T19:27:14Z</dc:date>
    </item>
  </channel>
</rss>

