<?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 Export DATA to csv with 16 decimal places in values ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-Export-DATA-to-csv-with-16-decimal-places-in-values/m-p/948865#M371217</link>
    <description>&lt;P&gt;If you got your dataframe result to a SAS dataset, you can formats to the columns you need to have a specified numger of decimals:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc datasets lib=&lt;EM&gt;library-name&lt;/EM&gt;;
	modify &lt;EM&gt;sas-dataset-name&lt;/EM&gt;;
		format &lt;EM&gt;variable-nam&lt;/EM&gt;e 22.16;
	run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 24 Oct 2024 09:35:24 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2024-10-24T09:35:24Z</dc:date>
    <item>
      <title>how to Export DATA to csv with 16 decimal places in values ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-Export-DATA-to-csv-with-16-decimal-places-in-values/m-p/948851#M371213</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to export dataframes calculated in SAS to csv with 16 decimal places. How do this ? is there an option in&amp;nbsp; proc export ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc export data=sas-dataset-name
  outfile='/path/to/output/filename.csv'
  dbms=csv
  replace;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 02:46:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-Export-DATA-to-csv-with-16-decimal-places-in-values/m-p/948851#M371213</guid>
      <dc:creator>RU114</dc:creator>
      <dc:date>2024-10-24T02:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to Export DATA to csv with 16 decimal places in values ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-Export-DATA-to-csv-with-16-decimal-places-in-values/m-p/948865#M371217</link>
      <description>&lt;P&gt;If you got your dataframe result to a SAS dataset, you can formats to the columns you need to have a specified numger of decimals:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc datasets lib=&lt;EM&gt;library-name&lt;/EM&gt;;
	modify &lt;EM&gt;sas-dataset-name&lt;/EM&gt;;
		format &lt;EM&gt;variable-nam&lt;/EM&gt;e 22.16;
	run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Oct 2024 09:35:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-Export-DATA-to-csv-with-16-decimal-places-in-values/m-p/948865#M371217</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2024-10-24T09:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to Export DATA to csv with 16 decimal places in values ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-Export-DATA-to-csv-with-16-decimal-places-in-values/m-p/948905#M371226</link>
      <description>&lt;P&gt;How critical are the 15th and 16th decimal places? If very critical then a basic SAS data set may not be where this belongs due to precision of storage.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 14:27:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-Export-DATA-to-csv-with-16-decimal-places-in-values/m-p/948905#M371226</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-10-24T14:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to Export DATA to csv with 16 decimal places in values ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-Export-DATA-to-csv-with-16-decimal-places-in-values/m-p/948938#M371248</link>
      <description>&lt;P&gt;Note that the 16th digit will not be reliable stored in SAS numbers.&amp;nbsp; See Numerical Precision discussion in the documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lepg/p0dv87zb3bnse6n1mqo360be70qr.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lepg/p0dv87zb3bnse6n1mqo360be70qr.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To control how values are PRINTED in SAS you can attach a FORMAT to the variable.&amp;nbsp; The EXPORT produces just uses a normal data step with PUT statement to write the CSV file.&amp;nbsp; So whatever format was attached to the variable will be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;16 digits total?&amp;nbsp; You might try using BEST17. (leaving one space for the decimal point). Or perhaps BEST18. if you have any negative values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;16 to the right of the decimal point?&amp;nbsp; How many to the left of the decimal point?&amp;nbsp; Use 18.16 to write 16 to the right of the decimal point, a decimal point, and one digit to the left.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or something else?&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 17:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-Export-DATA-to-csv-with-16-decimal-places-in-values/m-p/948938#M371248</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-10-24T17:21:13Z</dc:date>
    </item>
  </channel>
</rss>

