<?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 import csv specify a row for headers and a row for the first observation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-csv-specify-a-row-for-headers-and-a-row-for-the/m-p/261455#M50892</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/78691"&gt;@Sir_Highbury&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi ballardw,&lt;/P&gt;
&lt;P&gt;thank but this is what I am currently doing and I would not.&lt;/P&gt;
&lt;P&gt;So means that SAS cannot do it?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Show the exact code you run, the Log results and &amp;nbsp;show the data as a TXT file not Excel (it may&amp;nbsp;change values with out telling you).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should always use a fully qualified path to point to input and out file locations : datafile = "C:\somefolder\otherfolder\inputfile.csv" for example instead of&amp;nbsp; datafile="test.csv" as the later is going to read from what SAS considers the current active folder and is very likely not the location you expect.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Apr 2016 15:47:56 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-04-05T15:47:56Z</dc:date>
    <item>
      <title>Proc import csv specify a row for headers and a row for the first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-csv-specify-a-row-for-headers-and-a-row-for-the/m-p/261411#M50876</link>
      <description>&lt;P&gt;Dear SAS experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which ist the &lt;U&gt;easiest&lt;/U&gt; way to import a csv specifying:&lt;/P&gt;&lt;P&gt;- in wich row are the headers&lt;/P&gt;&lt;P&gt;- in which row start the data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried in several ways (dataeow, firstobs...) But I do not gest what i want.&lt;/P&gt;&lt;P&gt;for instance:&lt;/P&gt;&lt;P&gt;proc import datafile='test.csv'&lt;/P&gt;&lt;P&gt;&amp;nbsp; datarow=3; getnames=yes;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached an example of the csv input and the data that I would like to get in SAS.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 14:37:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-csv-specify-a-row-for-headers-and-a-row-for-the/m-p/261411#M50876</guid>
      <dc:creator>Sir_Highbury</dc:creator>
      <dc:date>2016-04-05T14:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import csv specify a row for headers and a row for the first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-csv-specify-a-row-for-headers-and-a-row-for-the/m-p/261418#M50878</link>
      <description>&lt;P&gt;Reading variable names from the CSV requires that the name be on a single row. Easiest is to Edit the CSV to remove the entire&amp;nbsp;first line with the column headers like "Platin/EURO".&lt;/P&gt;
&lt;P&gt;Then datarow=2 should work fine.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 14:45:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-csv-specify-a-row-for-headers-and-a-row-for-the/m-p/261418#M50878</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-04-05T14:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import csv specify a row for headers and a row for the first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-csv-specify-a-row-for-headers-and-a-row-for-the/m-p/261435#M50882</link>
      <description>&lt;P&gt;Hi ballardw,&lt;/P&gt;&lt;P&gt;thank but this is what I am currently doing and I would not.&lt;/P&gt;&lt;P&gt;So means that SAS cannot do it?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 15:19:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-csv-specify-a-row-for-headers-and-a-row-for-the/m-p/261435#M50882</guid>
      <dc:creator>Sir_Highbury</dc:creator>
      <dc:date>2016-04-05T15:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import csv specify a row for headers and a row for the first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-csv-specify-a-row-for-headers-and-a-row-for-the/m-p/261445#M50888</link>
      <description>&lt;P&gt;Use a data step to write a new copy of the file with the record(s) edited as you see fit. &amp;nbsp;Then run your PROC IMPORT on that.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 15:30:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-csv-specify-a-row-for-headers-and-a-row-for-the/m-p/261445#M50888</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-04-05T15:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import csv specify a row for headers and a row for the first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-csv-specify-a-row-for-headers-and-a-row-for-the/m-p/261455#M50892</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/78691"&gt;@Sir_Highbury&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi ballardw,&lt;/P&gt;
&lt;P&gt;thank but this is what I am currently doing and I would not.&lt;/P&gt;
&lt;P&gt;So means that SAS cannot do it?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Show the exact code you run, the Log results and &amp;nbsp;show the data as a TXT file not Excel (it may&amp;nbsp;change values with out telling you).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should always use a fully qualified path to point to input and out file locations : datafile = "C:\somefolder\otherfolder\inputfile.csv" for example instead of&amp;nbsp; datafile="test.csv" as the later is going to read from what SAS considers the current active folder and is very likely not the location you expect.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 15:47:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-csv-specify-a-row-for-headers-and-a-row-for-the/m-p/261455#M50892</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-04-05T15:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import csv specify a row for headers and a row for the first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-csv-specify-a-row-for-headers-and-a-row-for-the/m-p/261456#M50893</link>
      <description>&lt;P&gt;For a file with three variable just write the data step yourself. &amp;nbsp;Probably will take less code than the the PROC IMPORT statements.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
   infile "myfile.csv" dsd firstobs=3 truncover ;
   length date field1 field2 8 ;
   informat date mmddyy10.;
   format date yymmdd10.;
   input date field1 field2;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Apr 2016 15:52:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-csv-specify-a-row-for-headers-and-a-row-for-the/m-p/261456#M50893</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-04-05T15:52:32Z</dc:date>
    </item>
  </channel>
</rss>

