<?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 Reading CSV file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-CSV-file/m-p/312029#M67602</link>
    <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached a notepad file containing first 5 rows from a csv file. I used the following code. It worked. But I am not understanding why I have use firstobs=6 rather than firstobs=5 when the data starts in the 5 row. I am getting variable names in first row when I used firstrow=5. Please. Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;data one;&lt;BR /&gt;infile "C:\User\tt\Desk\thre.csv"&lt;BR /&gt;delimiter=',' firstobs=6 missover dsd;&lt;BR /&gt;format Screening_no DescOfDev Day DateDev DateIdentified Classification Category Outcome ReportedToRA ReportedToIRB ActionRequired $200.;&lt;BR /&gt;input Deviation_no Screening_no Subject DescOfDev Day DateDev DateIdentified Classification Category Outcome ReportedToRA ReportedToIRB ActionRequired;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Nov 2016 16:29:01 GMT</pubDate>
    <dc:creator>knveraraju91</dc:creator>
    <dc:date>2016-11-16T16:29:01Z</dc:date>
    <item>
      <title>Reading data from CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-CSV-file/m-p/312026#M67595</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached a notepad file containing first 5 rows from a csv file. I used the following code. It worked. But I am not understanding why I have use firstrow=6 rather than firstrow=5 when the data starts in the 5 row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data dv;&lt;BR /&gt;infile "C:\Users\tt\Desktop\three.csv"&lt;BR /&gt;delimiter=',' firstobs=6 missover dsd;&lt;BR /&gt;format Screening_no DescOfDev Day DateDev DateIdentified Classification Category Outcome ReportedToRA ReportedToIRB ActionRequired $200.;&lt;BR /&gt;input Deviation_no Screening_no Subject DescOfDev Day DateDev DateIdentified Classification Category Outcome ReportedToRA ReportedToIRB ActionRequired;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2016 16:25:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-CSV-file/m-p/312026#M67595</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-11-16T16:25:39Z</dc:date>
    </item>
    <item>
      <title>Reading CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-CSV-file/m-p/312029#M67602</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached a notepad file containing first 5 rows from a csv file. I used the following code. It worked. But I am not understanding why I have use firstobs=6 rather than firstobs=5 when the data starts in the 5 row. I am getting variable names in first row when I used firstrow=5. Please. Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;data one;&lt;BR /&gt;infile "C:\User\tt\Desk\thre.csv"&lt;BR /&gt;delimiter=',' firstobs=6 missover dsd;&lt;BR /&gt;format Screening_no DescOfDev Day DateDev DateIdentified Classification Category Outcome ReportedToRA ReportedToIRB ActionRequired $200.;&lt;BR /&gt;input Deviation_no Screening_no Subject DescOfDev Day DateDev DateIdentified Classification Category Outcome ReportedToRA ReportedToIRB ActionRequired;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2016 16:29:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-CSV-file/m-p/312029#M67602</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-11-16T16:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reading CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-CSV-file/m-p/312037#M67603</link>
      <description>&lt;P&gt;According to the preview of your data file, it does contain six rows? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2016 16:43:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-CSV-file/m-p/312037#M67603</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2016-11-16T16:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Reading CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-CSV-file/m-p/312038#M67604</link>
      <description>&lt;P&gt;It looks like you may have extra linefeeds in your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Deviation #,"Screening 
Number",Subject ID                     Number,Description &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;looks like the field containng Screening Number has a line feed and Number" starts on a different&amp;nbsp;obs when SAS reads the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the first line of actual data is the one that starts this way:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;0,O-0000,1000&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then that is the 6th line of the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2016 16:49:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-CSV-file/m-p/312038#M67604</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-11-16T16:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-CSV-file/m-p/312040#M67605</link>
      <description>&lt;P&gt;Row 5 doesn't contain data from what I can see, it contains variables names. &amp;nbsp;As you specify variable names on your input statement:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;input Deviation_no Screening_no Subject DescOfDev Day DateDev DateIdentified Classification Category Outcome ReportedToRA ReportedToIRB ActionRequired;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You don't need to read Row 5, just the data, which starts at row 6&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2016 16:49:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-CSV-file/m-p/312040#M67605</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-11-16T16:49:00Z</dc:date>
    </item>
  </channel>
</rss>

