<?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 how to export to a csv with an additional row header in SAS EG 4.2 in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-export-to-a-csv-with-an-additional-row-header-in-SAS-EG-4/m-p/103081#M9006</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I need to export a dataset adding an additional row to the data (csv file). For example, the dataset looks like this&lt;/P&gt;&lt;P&gt;ITEM, PRICE&lt;/P&gt;&lt;P&gt;AB, $50&lt;/P&gt;&lt;P&gt;CD, $40&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to export the dataset with an additional row before the heading, so it will like:&lt;/P&gt;&lt;P&gt;purchaselist,,&lt;/P&gt;&lt;P&gt;item, price&lt;/P&gt;&lt;P&gt;AB,$50&lt;/P&gt;&lt;P&gt;CD,$40&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Oct 2012 22:55:32 GMT</pubDate>
    <dc:creator>YW_CA</dc:creator>
    <dc:date>2012-10-22T22:55:32Z</dc:date>
    <item>
      <title>how to export to a csv with an additional row header in SAS EG 4.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-export-to-a-csv-with-an-additional-row-header-in-SAS-EG-4/m-p/103081#M9006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I need to export a dataset adding an additional row to the data (csv file). For example, the dataset looks like this&lt;/P&gt;&lt;P&gt;ITEM, PRICE&lt;/P&gt;&lt;P&gt;AB, $50&lt;/P&gt;&lt;P&gt;CD, $40&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to export the dataset with an additional row before the heading, so it will like:&lt;/P&gt;&lt;P&gt;purchaselist,,&lt;/P&gt;&lt;P&gt;item, price&lt;/P&gt;&lt;P&gt;AB,$50&lt;/P&gt;&lt;P&gt;CD,$40&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 22:55:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-export-to-a-csv-with-an-additional-row-header-in-SAS-EG-4/m-p/103081#M9006</guid>
      <dc:creator>YW_CA</dc:creator>
      <dc:date>2012-10-22T22:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to export to a csv with an additional row header in SAS EG 4.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-export-to-a-csv-with-an-additional-row-header-in-SAS-EG-4/m-p/103082#M9007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not quite point and click, but you could insert some code like that found at:&lt;/P&gt;&lt;P&gt;&lt;A href="https://groups.google.com/forum/?fromgroups=#!topic/comp.soft-sys.sas/5dRJhSHZdsA" title="https://groups.google.com/forum/?fromgroups=#!topic/comp.soft-sys.sas/5dRJhSHZdsA"&gt;Google Groups&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just before where the code has you "put" the variable names, you could have it "put" your initial string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 23:48:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-export-to-a-csv-with-an-additional-row-header-in-SAS-EG-4/m-p/103082#M9007</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-10-22T23:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to export to a csv with an additional row header in SAS EG 4.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-export-to-a-csv-with-an-additional-row-header-in-SAS-EG-4/m-p/103083#M9008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried this before. The thing is I am running the process in SAS EG from a SAS server, not from local. so when I wrote data _null_, put, it always complained about Insufficient authorization to access &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 00:01:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-export-to-a-csv-with-an-additional-row-header-in-SAS-EG-4/m-p/103083#M9008</guid>
      <dc:creator>YW_CA</dc:creator>
      <dc:date>2012-10-23T00:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to export to a csv with an additional row header in SAS EG 4.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-export-to-a-csv-with-an-additional-row-header-in-SAS-EG-4/m-p/103084#M9009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you run an export where are the files written?&amp;nbsp; Just indicate the same location (directory) in your file statement.&amp;nbsp; You have to have write ability somewhere.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 00:45:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-export-to-a-csv-with-an-additional-row-header-in-SAS-EG-4/m-p/103084#M9009</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-10-23T00:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to export to a csv with an additional row header in SAS EG 4.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-export-to-a-csv-with-an-additional-row-header-in-SAS-EG-4/m-p/103085#M9010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; In addition to the other suggestions, instead of doing an EXPORT, using PROC EXPORT or the LIBNAME engine, you could use PROC REPORT and ODS (ODS CSVALL or ODS CSV). In the code below, I show ODS CSVALL (which would also put a SAS title into the output file).;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data testdata;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; infile datalines dlm=',';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; input item $ price : comma.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;return;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;datalines;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;AB,$50&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;CD,$40&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods csvall file='c:\temp\something.csv';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; proc report data=testdata nowd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; column ('purchaselist' item price);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; format price dollar3.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods csvall close;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 01:38:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-export-to-a-csv-with-an-additional-row-header-in-SAS-EG-4/m-p/103085#M9010</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-10-23T01:38:04Z</dc:date>
    </item>
  </channel>
</rss>

