<?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: How to read from row 100 to row 200 from a large data? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-row-100-to-row-200-from-a-large-data/m-p/923072#M363427</link>
    <description>&lt;P&gt;In my experience FIRSTOBS and OBS are a very efficient way of pulling a small sample of rows from a large dataset so I don't see any need to find a 'better' way as long as it runs reliably and efficiently for your use case.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2024 01:36:41 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2024-04-05T01:36:41Z</dc:date>
    <item>
      <title>How to read from row 100 to row 200 from a large data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-row-100-to-row-200-from-a-large-data/m-p/923068#M363425</link>
      <description>&lt;P&gt;I would use the code to read row 100 to row 200 from a large dataset named "LargeData" below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data subset;
set LargeData (firstobs=100 obs=200);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any other better options? Many thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 01:10:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-row-100-to-row-200-from-a-large-data/m-p/923068#M363425</guid>
      <dc:creator>SeaMoon_168</dc:creator>
      <dc:date>2024-04-05T01:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from row 100 to row 200 from a large data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-row-100-to-row-200-from-a-large-data/m-p/923071#M363426</link>
      <description>&lt;P&gt;There are no better options, because the system will use the dataset pagesize to determine which page (think which physical block of disk storage) has obs 100.&amp;nbsp; And from there on it's sequential access through obs 200.&amp;nbsp; &amp;nbsp; &amp;nbsp;You would get almost as fast if firstobs=100100 obs=100200, because SAS doesn't read through the preceding disk blocks to get to the one of interest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 01:38:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-row-100-to-row-200-from-a-large-data/m-p/923071#M363426</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2024-04-05T01:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from row 100 to row 200 from a large data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-row-100-to-row-200-from-a-large-data/m-p/923072#M363427</link>
      <description>&lt;P&gt;In my experience FIRSTOBS and OBS are a very efficient way of pulling a small sample of rows from a large dataset so I don't see any need to find a 'better' way as long as it runs reliably and efficiently for your use case.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 01:36:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-row-100-to-row-200-from-a-large-data/m-p/923072#M363427</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-04-05T01:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from row 100 to row 200 from a large data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-row-100-to-row-200-from-a-large-data/m-p/923074#M363429</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*If your data engine allow randomly to access*/
data want;
do _n_=100 to 200;
 set sashelp.heart point=_n_;
 output;
end;
stop;
run; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Apr 2024 01:50:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-row-100-to-row-200-from-a-large-data/m-p/923074#M363429</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-04-05T01:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from row 100 to row 200 from a large data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-row-100-to-row-200-from-a-large-data/m-p/923077#M363431</link>
      <description>&lt;P&gt;The "downside" of POINT= is that SAS has to recalculate the page containing the desired obs for each iteration of the DO loop, unlike sequential access.&amp;nbsp; This probably isn't too bad because that calculation is pretty quick, and the identified page for each iteration is likely to be cached from the prior iteration.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 02:04:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-row-100-to-row-200-from-a-large-data/m-p/923077#M363431</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2024-04-05T02:04:35Z</dc:date>
    </item>
  </channel>
</rss>

