<?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 write format for numeric in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-format-for-numeric/m-p/564835#M158476</link>
    <description>&lt;P&gt;SAS numbers have a precision of 16 digits maximum.&lt;/P&gt;
&lt;P&gt;So you will not be able to read or store this number and keep all the exact digits.&lt;/P&gt;
&lt;P&gt;You can split the number if you still want to store as a number.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  file 'path\example.txt';
  put '234782617327.23456';
 run;

data WANT;
  infile 'path\example.txt';
  input;
  INT=input(      scan(_infile_,1,'.'),best16.);
  DEC=input('0.'||scan(_infile_,2,'.'),best16.);
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;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jun 2019 09:21:59 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2019-06-10T09:21:59Z</dc:date>
    <item>
      <title>How to write format for numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-format-for-numeric/m-p/564826#M158469</link>
      <description>I have one value 234782617327.23456&lt;BR /&gt;How to write informat and format for above value</description>
      <pubDate>Mon, 10 Jun 2019 08:07:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-format-for-numeric/m-p/564826#M158469</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2019-06-10T08:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to write format for numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-format-for-numeric/m-p/564835#M158476</link>
      <description>&lt;P&gt;SAS numbers have a precision of 16 digits maximum.&lt;/P&gt;
&lt;P&gt;So you will not be able to read or store this number and keep all the exact digits.&lt;/P&gt;
&lt;P&gt;You can split the number if you still want to store as a number.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  file 'path\example.txt';
  put '234782617327.23456';
 run;

data WANT;
  infile 'path\example.txt';
  input;
  INT=input(      scan(_infile_,1,'.'),best16.);
  DEC=input('0.'||scan(_infile_,2,'.'),best16.);
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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 09:21:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-format-for-numeric/m-p/564835#M158476</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-06-10T09:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to write format for numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-format-for-numeric/m-p/564837#M158478</link>
      <description>Data ex1;&lt;BR /&gt;Input number $30.;&lt;BR /&gt;Cards;&lt;BR /&gt;&lt;BR /&gt;234782617327.23456&lt;BR /&gt;&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;How to convert character to numeric&lt;BR /&gt;&lt;BR /&gt;Note: value should be same 234782617327.23456&lt;BR /&gt;&lt;BR /&gt;#- Please type your reply above this line. No attachments. -##</description>
      <pubDate>Mon, 10 Jun 2019 09:25:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-format-for-numeric/m-p/564837#M158478</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2019-06-10T09:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to write format for numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-format-for-numeric/m-p/564841#M158479</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/209685"&gt;@thanikondharish&lt;/a&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt; value should be same&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To repeat:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SAS numbers have a precision of 16 digits maximum.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can read this page if you want to know more.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://en.wikipedia.org/wiki/Floating-point_arithmetic" target="_self"&gt;https://en.wikipedia.org/wiki/Floating-point_arithmetic&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This sentence is the relevant part:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;A class="mw-redirect" title="Double precision" href="https://en.wikipedia.org/wiki/Double_precision" target="_blank" rel="noopener"&gt;Double precision&lt;/A&gt;, usually used to represent the "double" type in the C language family (though this is &lt;A title="C data types" href="https://en.wikipedia.org/wiki/C_data_types#Basic_types" target="_blank" rel="noopener"&gt;not guaranteed&lt;/A&gt;). This is a binary format that occupies 64 bits (8 bytes) and its significand has a precision of 53 bits (about 16 decimal digits).&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 10:19:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-format-for-numeric/m-p/564841#M158479</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-06-10T10:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to write format for numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-format-for-numeric/m-p/564885#M158496</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/209685"&gt;@thanikondharish&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Note: value should be same 234782617327.23456&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You should work on your reading skills. You have already been told that this is not possible.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 12:50:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-format-for-numeric/m-p/564885#M158496</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-06-10T12:50:00Z</dc:date>
    </item>
  </channel>
</rss>

