<?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 If there is eof to get end of file, is there an equivalent &amp;quot;start&amp;quot; option to get the first row? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/If-there-is-eof-to-get-end-of-file-is-there-an-equivalent-quot/m-p/594979#M171087</link>
    <description>&lt;P&gt;I know nobs can be used but just wondering if there also exists a start option since there is an "end" one.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2019 08:45:18 GMT</pubDate>
    <dc:creator>sustagens</dc:creator>
    <dc:date>2019-10-09T08:45:18Z</dc:date>
    <item>
      <title>If there is eof to get end of file, is there an equivalent "start" option to get the first row?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-there-is-eof-to-get-end-of-file-is-there-an-equivalent-quot/m-p/594979#M171087</link>
      <description>&lt;P&gt;I know nobs can be used but just wondering if there also exists a start option since there is an "end" one.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 08:45:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-there-is-eof-to-get-end-of-file-is-there-an-equivalent-quot/m-p/594979#M171087</guid>
      <dc:creator>sustagens</dc:creator>
      <dc:date>2019-10-09T08:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: If there is eof to get end of file, is there an equivalent "start" option to get the f</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-there-is-eof-to-get-end-of-file-is-there-an-equivalent-quot/m-p/594989#M171089</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;In a data step, a variable _N_ is automatically created and contains the currently processed row number. So you can just test :&lt;BR /&gt;if _N_=1 then ...</description>
      <pubDate>Wed, 09 Oct 2019 09:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-there-is-eof-to-get-end-of-file-is-there-an-equivalent-quot/m-p/594989#M171089</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2019-10-09T09:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: If there is eof to get end of file, is there an equivalent "start" option to get the f</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-there-is-eof-to-get-end-of-file-is-there-an-equivalent-quot/m-p/594992#M171091</link>
      <description>&lt;P&gt;Actually, _N_ contains the number of the current data step iteration. In most cases, since you only execute a set or merge statement once per iteration, this will correspond to the row number, but if you execute these statements more than once, you will get another result.&lt;/P&gt;
&lt;P&gt;Compare this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test1;
set sashelp.class;
count = _N_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;with this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test2;
do until (end_of_file);
  set sashelp.class end=end_of_file;
  count = _N_;
  output;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 09:35:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-there-is-eof-to-get-end-of-file-is-there-an-equivalent-quot/m-p/594992#M171091</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-09T09:35:27Z</dc:date>
    </item>
  </channel>
</rss>

