<?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 CSV file creation assistance needed in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/CSV-file-creation-assistance-needed/m-p/121628#M259799</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am relatively new to SAS programming.&amp;nbsp; The state has modified how they want their data files.&amp;nbsp; They used to want .dat files and now have changed to .csv files with 2 header records (second one has the column headings). What is the best way to do this in a SAS program?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Apr 2013 13:21:05 GMT</pubDate>
    <dc:creator>HarfordKaren</dc:creator>
    <dc:date>2013-04-26T13:21:05Z</dc:date>
    <item>
      <title>CSV file creation assistance needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-file-creation-assistance-needed/m-p/121628#M259799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am relatively new to SAS programming.&amp;nbsp; The state has modified how they want their data files.&amp;nbsp; They used to want .dat files and now have changed to .csv files with 2 header records (second one has the column headings). What is the best way to do this in a SAS program?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 13:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-file-creation-assistance-needed/m-p/121628#M259799</guid>
      <dc:creator>HarfordKaren</dc:creator>
      <dc:date>2013-04-26T13:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: CSV file creation assistance needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-file-creation-assistance-needed/m-p/121629#M259800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is SAS code that demonstrates how to use a DATA step to generate a CSV file with two lines for heading&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _NULL_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.class;&amp;nbsp; /* replace with your data set name */&lt;/P&gt;&lt;P&gt;file 'c:\temp\test.csv' dlm=',';&lt;/P&gt;&lt;P&gt;if _N_ = 1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put 'first line heading';&amp;nbsp; /* replace with your heading */&lt;/P&gt;&lt;P&gt;&amp;nbsp; put 'name,age,sex,height,weight'; /* replace with your variables */&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;put name age sex height weight; /* replace with your variables */&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have more then 256 characters per output line, you need an LRECL parameter on the FILE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I invite you to send email to support.sas.com if you have further questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 13:52:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-file-creation-assistance-needed/m-p/121629#M259800</guid>
      <dc:creator>jwsquillace</dc:creator>
      <dc:date>2013-04-26T13:52:49Z</dc:date>
    </item>
  </channel>
</rss>

