<?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: Using PUT to output simple csv with variables in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-PUT-to-output-simple-csv-with-variables/m-p/598#M288</link>
    <description>Thank you!!!&lt;BR /&gt;
&lt;BR /&gt;
That was a neat trick - I was looking for all over the documentations for some special options!&lt;BR /&gt;
&lt;BR /&gt;
James</description>
    <pubDate>Tue, 09 May 2006 18:40:09 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2006-05-09T18:40:09Z</dc:date>
    <item>
      <title>Using PUT to output simple csv with variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-PUT-to-output-simple-csv-with-variables/m-p/596#M286</link>
      <description>data outdata.ivrs (keep = protocol site screen dob lbdt hgb tsat ferr gfr_cb gfr);&lt;BR /&gt;
	set outdata.indata;&lt;BR /&gt;
	file 'c:\Local\kimj\Studies\Luitpold\test.csv' dlm=',';&lt;BR /&gt;
	put protocol site screen dob lbdt hgb tsat ferr gfr_cb gfr;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
------------------------------------&lt;BR /&gt;
Hello,&lt;BR /&gt;
&lt;BR /&gt;
I'm creating a simple csv file using FILE and PUT in the above code.&lt;BR /&gt;
I'm trying to insert the variable names in the first row automatically - what would be the easiest way to do so?&lt;BR /&gt;
&lt;BR /&gt;
Thank you for your help.&lt;BR /&gt;
&lt;BR /&gt;
James</description>
      <pubDate>Tue, 09 May 2006 18:22:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-PUT-to-output-simple-csv-with-variables/m-p/596#M286</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-05-09T18:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using PUT to output simple csv with variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-PUT-to-output-simple-csv-with-variables/m-p/597#M287</link>
      <description>Try putting these lines in between your file and put lines&lt;BR /&gt;
&lt;BR /&gt;
if _n_ = 1 then do;&lt;BR /&gt;
put 'protocol' 'site' etc.;&lt;BR /&gt;
end;</description>
      <pubDate>Tue, 09 May 2006 18:29:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-PUT-to-output-simple-csv-with-variables/m-p/597#M287</guid>
      <dc:creator>garybald</dc:creator>
      <dc:date>2006-05-09T18:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using PUT to output simple csv with variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-PUT-to-output-simple-csv-with-variables/m-p/598#M288</link>
      <description>Thank you!!!&lt;BR /&gt;
&lt;BR /&gt;
That was a neat trick - I was looking for all over the documentations for some special options!&lt;BR /&gt;
&lt;BR /&gt;
James</description>
      <pubDate>Tue, 09 May 2006 18:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-PUT-to-output-simple-csv-with-variables/m-p/598#M288</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-05-09T18:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using PUT to output simple csv with variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-PUT-to-output-simple-csv-with-variables/m-p/599#M289</link>
      <description>Also, since this is the ODS forum &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; ODS CSV will do it automatically without any PUT statements at all and it will work with other procedures, not just PROC PRINT and if you want titles or bylines, then you can use ODS CSVALL instead.&lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
ODS CSV file='c:\temp\wombat.csv';&lt;BR /&gt;
proc print data=sashelp.class;&lt;BR /&gt;
run;&lt;BR /&gt;
ODS CSV CLOSE;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 10 May 2006 17:00:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-PUT-to-output-simple-csv-with-variables/m-p/599#M289</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2006-05-10T17:00:25Z</dc:date>
    </item>
  </channel>
</rss>

