<?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: Proc Export - Format issues in Csv file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Export-Format-issues-in-Csv-file/m-p/663148#M197912</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/123340"&gt;@baskisb&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Im using proc export with DBMS = csv and replace option and the email getting generated to outbound location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But what i observed the the columns which has character values in SAS dataset ( for example : Classfication : 1,2,3 ( in char)&amp;nbsp; ; Flag = 4,7,1 ( in char) ) those are changing as numeric when i open csv file on email.its automatically changing char to numeric as right alignment .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help in proc export how do we fix this , kindly help on this case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Venkat&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A CSV file is jut plain text. It has no metadata about the type of data in contains (other than the optional header row).&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What program are you using to view the CSV file?&amp;nbsp; If it is Excel you need to do a little work to tell it what data type to use for each column.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jun 2020 12:53:28 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2020-06-18T12:53:28Z</dc:date>
    <item>
      <title>Proc Export - Format issues in Csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Export-Format-issues-in-Csv-file/m-p/663102#M197886</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im using proc export with DBMS = csv and replace option and the email getting generated to outbound location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what i observed the the columns which has character values in SAS dataset ( for example : Classfication : 1,2,3 ( in char)&amp;nbsp; ; Flag = 4,7,1 ( in char) ) those are changing as numeric when i open csv file on email.its automatically changing char to numeric as right alignment .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help in proc export how do we fix this , kindly help on this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 09:57:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Export-Format-issues-in-Csv-file/m-p/663102#M197886</guid>
      <dc:creator>baskisb</dc:creator>
      <dc:date>2020-06-18T09:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export - Format issues in Csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Export-Format-issues-in-Csv-file/m-p/663111#M197891</link>
      <description>&lt;P&gt;I think the problem is with whatever application you use to read the .csv-file. PROC EXPORT very nicely puts quotes around values like that, so it should be read as a single character value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One workaround may be to change the delimiter to ';', if your application can understand that as a delimiter. Otherwise, use some other application to view the file.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 10:34:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Export-Format-issues-in-Csv-file/m-p/663111#M197891</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2020-06-18T10:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export - Format issues in Csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Export-Format-issues-in-Csv-file/m-p/663124#M197901</link>
      <description>&lt;P&gt;Let me guess: you are using Excel to display the csv-file, right? Try using a text-editor, that has not the fancy habits Excel has.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 11:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Export-Format-issues-in-Csv-file/m-p/663124#M197901</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-06-18T11:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export - Format issues in Csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Export-Format-issues-in-Csv-file/m-p/663125#M197902</link>
      <description>&lt;P&gt;I ran this code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input var1 $ var2 $ var3;
datalines;
A 1,2,3 5
;

proc export
  data=have
  file="/folders/myfolders/have.csv"
  dbms=csv
  replace
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and got this in the file:&lt;/P&gt;
&lt;PRE&gt;var1,var2,var3
A,"1,2,3",5
&lt;/PRE&gt;
&lt;P&gt;which is as it should be.&lt;/P&gt;
&lt;P&gt;Opening the file with LibreOffice also resulted in a left-aligned string.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 11:15:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Export-Format-issues-in-Csv-file/m-p/663125#M197902</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-18T11:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export - Format issues in Csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Export-Format-issues-in-Csv-file/m-p/663148#M197912</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/123340"&gt;@baskisb&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Im using proc export with DBMS = csv and replace option and the email getting generated to outbound location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But what i observed the the columns which has character values in SAS dataset ( for example : Classfication : 1,2,3 ( in char)&amp;nbsp; ; Flag = 4,7,1 ( in char) ) those are changing as numeric when i open csv file on email.its automatically changing char to numeric as right alignment .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help in proc export how do we fix this , kindly help on this case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Venkat&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A CSV file is jut plain text. It has no metadata about the type of data in contains (other than the optional header row).&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What program are you using to view the CSV file?&amp;nbsp; If it is Excel you need to do a little work to tell it what data type to use for each column.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 12:53:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Export-Format-issues-in-Csv-file/m-p/663148#M197912</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-06-18T12:53:28Z</dc:date>
    </item>
  </channel>
</rss>

