<?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 firstobs obs not giving intended result? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/firstobs-obs-not-giving-intended-result/m-p/842653#M333197</link>
    <description>&lt;P&gt;Hi, on page 85 of the official SAS specialist prep guide, there is an example showing us how to use firstops and obs option in the proc print step that will override the system options.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are only 20 observations in heart file. So when they use firstobs=20 obs=30, only one observation is produced, is that a typo because they said to produce the same output (6 observations) or am I misunderstanding the intention of the author?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;heart.sas7dbat attached if you want to have a look at the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nietzsche_1-1667646276436.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76976i196A2A30CD7C08F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Nietzsche_1-1667646276436.png" alt="Nietzsche_1-1667646276436.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 05 Nov 2022 11:09:29 GMT</pubDate>
    <dc:creator>Nietzsche</dc:creator>
    <dc:date>2022-11-05T11:09:29Z</dc:date>
    <item>
      <title>firstobs obs not giving intended result?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firstobs-obs-not-giving-intended-result/m-p/842653#M333197</link>
      <description>&lt;P&gt;Hi, on page 85 of the official SAS specialist prep guide, there is an example showing us how to use firstops and obs option in the proc print step that will override the system options.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are only 20 observations in heart file. So when they use firstobs=20 obs=30, only one observation is produced, is that a typo because they said to produce the same output (6 observations) or am I misunderstanding the intention of the author?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;heart.sas7dbat attached if you want to have a look at the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nietzsche_1-1667646276436.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76976i196A2A30CD7C08F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Nietzsche_1-1667646276436.png" alt="Nietzsche_1-1667646276436.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 11:09:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firstobs-obs-not-giving-intended-result/m-p/842653#M333197</guid>
      <dc:creator>Nietzsche</dc:creator>
      <dc:date>2022-11-05T11:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: firstobs obs not giving intended result?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firstobs-obs-not-giving-intended-result/m-p/842654#M333198</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/431484"&gt;@Nietzsche&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;is that a typo because they said to produce the same output (6 observations) or am I misunderstanding the intention of the author?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;IMHO it makes only sense the other way round. 20 and 30 in the options statement and 10 and 15 in the options of the data set. That would demonstrate that defaults are overwritten ... and came up with the same results as the previous code segment.&lt;/P&gt;
&lt;P&gt;Just my 2ct&lt;/P&gt;
&lt;P&gt;Fja&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 17:22:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firstobs-obs-not-giving-intended-result/m-p/842654#M333198</guid>
      <dc:creator>fja</dc:creator>
      <dc:date>2022-11-05T17:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: firstobs obs not giving intended result?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firstobs-obs-not-giving-intended-result/m-p/842655#M333199</link>
      <description>&lt;P&gt;Bad phrasing. It would have been better to put the 20/30 combination into the OPTIONS statement and then override that with the original 10/15.&lt;/P&gt;
&lt;P&gt;Or make it clear that the result will be the same&lt;EM&gt; effect&lt;/EM&gt;, but with a different outcome.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 11:32:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firstobs-obs-not-giving-intended-result/m-p/842655#M333199</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-11-05T11:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: firstobs obs not giving intended result?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firstobs-obs-not-giving-intended-result/m-p/842670#M333204</link>
      <description>&lt;P&gt;They just left out explicitly showing all three combinations.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1667659466344.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76980i1E12BFDAABAA5553/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tom_0-1667659466344.png" alt="Tom_0-1667659466344.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1667659687366.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76981i79F6F745CE0DF9FC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tom_0-1667659687366.png" alt="Tom_0-1667659687366.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 14:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firstobs-obs-not-giving-intended-result/m-p/842670#M333204</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-05T14:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: firstobs obs not giving intended result?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firstobs-obs-not-giving-intended-result/m-p/842693#M333214</link>
      <description>&lt;P&gt;That's not bad just phrasing, it's bad logic/code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Think the author was having a mental lapse went he wrote that code given he used the wrong library in the same code as well, hopefully SAS institute will put that into their official Errata (aka update)&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 18:51:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firstobs-obs-not-giving-intended-result/m-p/842693#M333214</guid>
      <dc:creator>Nietzsche</dc:creator>
      <dc:date>2022-11-05T18:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: firstobs obs not giving intended result?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firstobs-obs-not-giving-intended-result/m-p/842694#M333215</link>
      <description>&lt;P&gt;Seems very clear to me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The point (as highlighted by the TIP) is that the dataset options OVERRIDE the system options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The fact that the dataset referenced does not match the datasets in the course is a minor annoyance. (It is also an added learning opportunity.&amp;nbsp; You need to build up you ability to translate example code to your situation).&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 19:34:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firstobs-obs-not-giving-intended-result/m-p/842694#M333215</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-05T19:34:57Z</dc:date>
    </item>
  </channel>
</rss>

