<?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: Numeric data converted to scientific notation in .CSV file in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Numeric-data-converted-to-scientific-notation-in-CSV-file/m-p/235512#M6018</link>
    <description>&lt;P&gt;Don't open in Excel, or make the columns wider the appearnce should change.. CSV does not have any format information in the file, it is only text.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Nov 2015 17:33:33 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-11-19T17:33:33Z</dc:date>
    <item>
      <title>Numeric data converted to scientific notation in .CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Numeric-data-converted-to-scientific-notation-in-CSV-file/m-p/235510#M6017</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am creating a .csv file in mainframe using SAS and email the file as an attachment. When I open the file the numeric data, for example, customer id 1234567898 is converted into 123E.11 something like that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please let me know how I can retain the format of the numeric variable in .CSV file( I know when I open the .csv file in Excel this weird conversion happens).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 17:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Numeric-data-converted-to-scientific-notation-in-CSV-file/m-p/235510#M6017</guid>
      <dc:creator>renjithr</dc:creator>
      <dc:date>2015-11-19T17:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric data converted to scientific notation in .CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Numeric-data-converted-to-scientific-notation-in-CSV-file/m-p/235512#M6018</link>
      <description>&lt;P&gt;Don't open in Excel, or make the columns wider the appearnce should change.. CSV does not have any format information in the file, it is only text.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 17:33:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Numeric-data-converted-to-scientific-notation-in-CSV-file/m-p/235512#M6018</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-11-19T17:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric data converted to scientific notation in .CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Numeric-data-converted-to-scientific-notation-in-CSV-file/m-p/235516#M6019</link>
      <description>Open the CSV in a text editor (Notepad/Wordpad) and verify the data. Excel is most likely making the conversion automatically. Very nice of it.  Usually making the cell bigger will change the format to a number. You can also, try to make it a character variable and make sure you export it as a quoted variable and then Excel MAY read it properly. Not always...</description>
      <pubDate>Thu, 19 Nov 2015 17:42:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Numeric-data-converted-to-scientific-notation-in-CSV-file/m-p/235516#M6019</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-19T17:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric data converted to scientific notation in .CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Numeric-data-converted-to-scientific-notation-in-CSV-file/m-p/235593#M6021</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the reponse.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is how I finally achieved retining the format of numeric variable in .CSV file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;file filout;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;if _n_=1 then do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; put @1 '="'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @2 'Num variable'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @10 '"';&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;put @2 num_var;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;The above trick works!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2015 01:16:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Numeric-data-converted-to-scientific-notation-in-CSV-file/m-p/235593#M6021</guid>
      <dc:creator>renjithr</dc:creator>
      <dc:date>2015-11-20T01:16:23Z</dc:date>
    </item>
  </channel>
</rss>

