<?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 Using Export button in SAS EG versus PROC EXPORT causes issues in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-Export-button-in-SAS-EG-versus-PROC-EXPORT-causes-issues/m-p/472170#M121020</link>
    <description>&lt;P&gt;I have a certain SAS dataset I need to export as a CSV file in order to import it into a different software program. When I click the Export button, the CSV file exports nicely, and I change a few variable names that were shortened by the 32 character cap, and import into the different software.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can get tedious, so I am trying to use PROC SQL to give each variable a label with its proper name, whether it has fewer than 32 characters or more, and automatically export as a CSV, using the labels for headers instead of the variable names. My issue is, when I use PROC EXPORT, my CSV files comes out differently, and it won't import into my software. I notice the PROC EXPORT CSV file has quotations around each variable name in the header-- they don't have quotations when I use the Export button-- and each row of data is not necessarily on it's own row, as it is when I use the Export button. Any thoughts on how I could fix either of these issues? I'm not sure which is causing the issue with the other software program. Here's the PROC EXPORT code I'm using. Thanks for reading.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc export&lt;BR /&gt;data = WORK.MY_DATA&lt;BR /&gt;outfile = "&amp;amp;folderpath./&amp;amp;filename..csv"&lt;BR /&gt;label&lt;BR /&gt;dbms = csv&lt;BR /&gt;replace;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jun 2018 15:46:07 GMT</pubDate>
    <dc:creator>leftygrove</dc:creator>
    <dc:date>2018-06-21T15:46:07Z</dc:date>
    <item>
      <title>Using Export button in SAS EG versus PROC EXPORT causes issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Export-button-in-SAS-EG-versus-PROC-EXPORT-causes-issues/m-p/472170#M121020</link>
      <description>&lt;P&gt;I have a certain SAS dataset I need to export as a CSV file in order to import it into a different software program. When I click the Export button, the CSV file exports nicely, and I change a few variable names that were shortened by the 32 character cap, and import into the different software.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can get tedious, so I am trying to use PROC SQL to give each variable a label with its proper name, whether it has fewer than 32 characters or more, and automatically export as a CSV, using the labels for headers instead of the variable names. My issue is, when I use PROC EXPORT, my CSV files comes out differently, and it won't import into my software. I notice the PROC EXPORT CSV file has quotations around each variable name in the header-- they don't have quotations when I use the Export button-- and each row of data is not necessarily on it's own row, as it is when I use the Export button. Any thoughts on how I could fix either of these issues? I'm not sure which is causing the issue with the other software program. Here's the PROC EXPORT code I'm using. Thanks for reading.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc export&lt;BR /&gt;data = WORK.MY_DATA&lt;BR /&gt;outfile = "&amp;amp;folderpath./&amp;amp;filename..csv"&lt;BR /&gt;label&lt;BR /&gt;dbms = csv&lt;BR /&gt;replace;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 15:46:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Export-button-in-SAS-EG-versus-PROC-EXPORT-causes-issues/m-p/472170#M121020</guid>
      <dc:creator>leftygrove</dc:creator>
      <dc:date>2018-06-21T15:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using Export button in SAS EG versus PROC EXPORT causes issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Export-button-in-SAS-EG-versus-PROC-EXPORT-causes-issues/m-p/472175#M121024</link>
      <description>&lt;P&gt;Labels can have spaces or comma's so that's why your headers are now in quotes.&lt;/P&gt;
&lt;P&gt;Just a guess on the second issues - when you export in PROC EXPORT is it running on the same OS? Is SAS EG on a server? If so, it may be creating a file with UNIX&amp;nbsp;characters&amp;nbsp;rather than Window EOL characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/204343"&gt;@leftygrove&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a certain SAS dataset I need to export as a CSV file in order to import it into a different software program. When I click the Export button, the CSV file exports nicely, and I change a few variable names that were shortened by the 32 character cap, and import into the different software.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This can get tedious, so I am trying to use PROC SQL to give each variable a label with its proper name, whether it has fewer than 32 characters or more, and automatically export as a CSV, using the labels for headers instead of the variable names. My issue is, when I use PROC EXPORT, my CSV files comes out differently, and it won't import into my software. I notice the PROC EXPORT CSV file has quotations around each variable name in the header-- they don't have quotations when I use the Export button-- and each row of data is not necessarily on it's own row, as it is when I use the Export button. Any thoughts on how I could fix either of these issues? I'm not sure which is causing the issue with the other software program. Here's the PROC EXPORT code I'm using. Thanks for reading.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc export&lt;BR /&gt;data = WORK.MY_DATA&lt;BR /&gt;outfile = "&amp;amp;folderpath./&amp;amp;filename..csv"&lt;BR /&gt;label&lt;BR /&gt;dbms = csv&lt;BR /&gt;replace;&lt;BR /&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 15:50:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Export-button-in-SAS-EG-versus-PROC-EXPORT-causes-issues/m-p/472175#M121024</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-21T15:50:21Z</dc:date>
    </item>
  </channel>
</rss>

