<?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: Import first 5 obs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-first-5-obs/m-p/848279#M335375</link>
    <description>&lt;P&gt;I think you need to import using a data step to do this.&lt;/P&gt;
&lt;P&gt;And there use tha automatic variable _n_ to control you import logic.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Dec 2022 07:33:42 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2022-12-07T07:33:42Z</dc:date>
    <item>
      <title>Import first 5 obs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-first-5-obs/m-p/848277#M335374</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Let's say that I export cars data set into txt file with comma delimiter.&lt;/P&gt;
&lt;P&gt;Let's say that I want to import this txt file into sas data set.&lt;/P&gt;
&lt;P&gt;I want to import only observations 6 to 10&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the way to do it?&lt;/P&gt;
&lt;P&gt;I get an error&lt;/P&gt;
&lt;P&gt;WARNING 70-63: The option FIRSTOBS is not valid in this context. Option ignored.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc export data=sashelp.cars outfile="/path/cars.txt" dbms=dlm replace;&lt;BR /&gt;delimiter=','; &lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc import datafile ="/path/cars.txt"
out=cars_tbl(firstobs=6 obs=10) 
dbms=dlm
replace;
delimiter = ',';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Dec 2022 06:59:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-first-5-obs/m-p/848277#M335374</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-12-07T06:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Import first 5 obs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-first-5-obs/m-p/848279#M335375</link>
      <description>&lt;P&gt;I think you need to import using a data step to do this.&lt;/P&gt;
&lt;P&gt;And there use tha automatic variable _n_ to control you import logic.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 07:33:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-first-5-obs/m-p/848279#M335375</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-12-07T07:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Import first 5 obs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-first-5-obs/m-p/848283#M335376</link>
      <description>&lt;P&gt;Read it with a DATA step, and use the FIRSTOBS= and OBS= options of the INFILE statement.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 08:32:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-first-5-obs/m-p/848283#M335376</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-12-07T08:32:27Z</dc:date>
    </item>
  </channel>
</rss>

