<?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: firstobs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/firstobs/m-p/616158#M180340</link>
    <description>&lt;P&gt;As the &lt;A href="https://documentation.sas.com/?docsetId=ledsoptsref&amp;amp;docsetTarget=p0wjxoxrco6dsgn1ls5n3mbybcng.htm&amp;amp;docsetVersion=3.1&amp;amp;locale=en" target="_self"&gt;Firstobs= Options Doc&lt;/A&gt; says: &lt;EM&gt;"When the FIRSTOBS= data set option specifies a starting point for processing, the OBS= data set option specifies an ending point. The two options are often used together to define a range of observations to be processed.&amp;nbsp;"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Therefore, do this instead&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new;
    set ttt(firstobs=3 obs=6);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 09 Jan 2020 10:01:25 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2020-01-09T10:01:25Z</dc:date>
    <item>
      <title>firstobs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firstobs/m-p/616157#M180339</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to create a new data set that start from observation&amp;nbsp; 3 and take 4 observations.&lt;/P&gt;
&lt;P&gt;However in the reslut I get only 2&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ttt;
input ID x;
1 10
2 20
3 30
4 40
5 50
6 60
7 70
8 80
9 90
10 100
;
run;
data new;
    set ttt(firstobs=3 obs=4);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jan 2020 09:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firstobs/m-p/616157#M180339</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2020-01-09T09:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: firstobs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firstobs/m-p/616158#M180340</link>
      <description>&lt;P&gt;As the &lt;A href="https://documentation.sas.com/?docsetId=ledsoptsref&amp;amp;docsetTarget=p0wjxoxrco6dsgn1ls5n3mbybcng.htm&amp;amp;docsetVersion=3.1&amp;amp;locale=en" target="_self"&gt;Firstobs= Options Doc&lt;/A&gt; says: &lt;EM&gt;"When the FIRSTOBS= data set option specifies a starting point for processing, the OBS= data set option specifies an ending point. The two options are often used together to define a range of observations to be processed.&amp;nbsp;"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Therefore, do this instead&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new;
    set ttt(firstobs=3 obs=6);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jan 2020 10:01:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firstobs/m-p/616158#M180340</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-01-09T10:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: firstobs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firstobs/m-p/616166#M180347</link>
      <description>&lt;P&gt;obs= does not specify the number of observations to be read, but a specific observation number up to which the data is read. So you get observation #3 and observation #4.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 12:08:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firstobs/m-p/616166#M180347</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-01-09T12:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: firstobs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firstobs/m-p/616176#M180354</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp; Easy way to understand is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FIRSTOBS=&amp;nbsp; specifies the first observation to read.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OBS= Last observation to read.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What perhaps confused you is the thought OBS = is the number of observations of read however it is the last observation to read. Also, FirstOBs should never be greater than Obs at all times. Hope this helps&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 13:05:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firstobs/m-p/616176#M180354</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-01-09T13:05:00Z</dc:date>
    </item>
  </channel>
</rss>

