<?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 Problem while creating CSV File in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-while-creating-CSV-File/m-p/5304#M1679</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I am using a piece of code to convert dataset to csv in my EG project&lt;BR /&gt;
&lt;BR /&gt;
Code:&lt;BR /&gt;
&lt;BR /&gt;
 %ds2csv (data=WORK.QUERY_FOR_QUERY9263, runmode=b, csvfile=/apps/sas/ReportsRepository/Reports/BSS/BMA/CSV/Monthly/BM_SREP0038_StkVal_&amp;amp;date1..csv,openmode=REPLACE);&lt;BR /&gt;
&lt;BR /&gt;
In the same project I am creating a text file through proc report by having outfile in my code and I have specified ls=256.&lt;BR /&gt;
&lt;BR /&gt;
The  CSV file which is created the last column label gets truncated since its going above 256 length when all columns together.&lt;BR /&gt;
&lt;BR /&gt;
Below is the CSV File &lt;BR /&gt;
If u see the column header Tot is displayed Instead of Total becoz of that &lt;BR /&gt;
the first row is displayed on the level of column header.&lt;BR /&gt;
Any solution to avoid this&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Branch No","Branch Name","Main Stock","Damaged Stock","Quarantine","Return to supplier","Trade Counter Display","Supplier Consignment","Co- managed Inventory","Customer Consignment","Goods In","Off site","Total Of  XYZ Stock","Total Of Non XYZ Stock","Tot&lt;BR /&gt;
"1110","1110 abc","1,635,407.02","0.00","0.00","0.00","0.00","0.00","0.00","0.00","0.00","0.00","1,635,407.02","0.00","1,635,407.02"

Message was edited by: Sunil Gandhi</description>
    <pubDate>Thu, 01 Nov 2007 09:41:54 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-11-01T09:41:54Z</dc:date>
    <item>
      <title>Problem while creating CSV File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-while-creating-CSV-File/m-p/5304#M1679</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I am using a piece of code to convert dataset to csv in my EG project&lt;BR /&gt;
&lt;BR /&gt;
Code:&lt;BR /&gt;
&lt;BR /&gt;
 %ds2csv (data=WORK.QUERY_FOR_QUERY9263, runmode=b, csvfile=/apps/sas/ReportsRepository/Reports/BSS/BMA/CSV/Monthly/BM_SREP0038_StkVal_&amp;amp;date1..csv,openmode=REPLACE);&lt;BR /&gt;
&lt;BR /&gt;
In the same project I am creating a text file through proc report by having outfile in my code and I have specified ls=256.&lt;BR /&gt;
&lt;BR /&gt;
The  CSV file which is created the last column label gets truncated since its going above 256 length when all columns together.&lt;BR /&gt;
&lt;BR /&gt;
Below is the CSV File &lt;BR /&gt;
If u see the column header Tot is displayed Instead of Total becoz of that &lt;BR /&gt;
the first row is displayed on the level of column header.&lt;BR /&gt;
Any solution to avoid this&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Branch No","Branch Name","Main Stock","Damaged Stock","Quarantine","Return to supplier","Trade Counter Display","Supplier Consignment","Co- managed Inventory","Customer Consignment","Goods In","Off site","Total Of  XYZ Stock","Total Of Non XYZ Stock","Tot&lt;BR /&gt;
"1110","1110 abc","1,635,407.02","0.00","0.00","0.00","0.00","0.00","0.00","0.00","0.00","0.00","1,635,407.02","0.00","1,635,407.02"

Message was edited by: Sunil Gandhi</description>
      <pubDate>Thu, 01 Nov 2007 09:41:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-while-creating-CSV-File/m-p/5304#M1679</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-11-01T09:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while creating CSV File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-while-creating-CSV-File/m-p/5305#M1680</link>
      <description>Hi...some of those old macros did respect line size limitations -- which is just one of the reasons why I wouldn't use them anymore. They are left over from Version 6 and Version 8. ODS generally ignores linesize for non-listing destinations (like CSV, HTML, RTF, etc).&lt;BR /&gt;
&lt;BR /&gt;
Try:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods csv file="/apps/sas/ReportsRepository/Reports/BSS/BMA/CSV/Monthly/BM_SREP0038_StkVal_&amp;amp;date1..csv";&lt;BR /&gt;
proc print data=work.query_for_query9263;&lt;BR /&gt;
run;&lt;BR /&gt;
ods csv close;&lt;BR /&gt;
 &lt;BR /&gt;
[/pre]&lt;BR /&gt;
And see whether you run into the same limitation...I don't think you will. Otherwise, you might consider contacting Tech Support. There are other ways to create CSV files from SAS datasets, but I think the ODS method will work for you.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 01 Nov 2007 16:47:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-while-creating-CSV-File/m-p/5305#M1680</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-11-01T16:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while creating CSV File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-while-creating-CSV-File/m-p/5306#M1681</link>
      <description>Thanks a lot.&lt;BR /&gt;
It worked.</description>
      <pubDate>Thu, 01 Nov 2007 17:24:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-while-creating-CSV-File/m-p/5306#M1681</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-11-01T17:24:30Z</dc:date>
    </item>
  </channel>
</rss>

