<?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: What does this code do? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/What-does-this-code-do/m-p/593791#M15571</link>
    <description>Thank you!</description>
    <pubDate>Thu, 03 Oct 2019 15:54:41 GMT</pubDate>
    <dc:creator>jffeudo86</dc:creator>
    <dc:date>2019-10-03T15:54:41Z</dc:date>
    <item>
      <title>What does this code do?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-does-this-code-do/m-p/593779#M15568</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have the following code below.&amp;nbsp; dataset sample1 is sorted by id and priority.&amp;nbsp; What does "if obs=1; drop obs;" mean and why would it drop obs? Does it also mean that if obs&amp;gt;1, the obs is still there?&amp;nbsp; Help please.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data sample;&lt;BR /&gt;set sample1;&lt;BR /&gt;by id priority;&lt;BR /&gt;&lt;BR /&gt;if first.id then&lt;BR /&gt;obs=0;&lt;BR /&gt;obs+1;&lt;BR /&gt;&lt;BR /&gt;if obs=1;&lt;BR /&gt;drop obs;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 15:31:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-does-this-code-do/m-p/593779#M15568</guid>
      <dc:creator>jffeudo86</dc:creator>
      <dc:date>2019-10-03T15:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: What does this code do?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-does-this-code-do/m-p/593780#M15569</link>
      <description>&lt;P&gt;Takes the first observation for each value of ID.&lt;/P&gt;
&lt;P&gt;Same as this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
  set sample1;
  by id priority;
  if first.id ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 15:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-does-this-code-do/m-p/593780#M15569</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-10-03T15:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: What does this code do?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-does-this-code-do/m-p/593791#M15571</link>
      <description>Thank you!</description>
      <pubDate>Thu, 03 Oct 2019 15:54:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-does-this-code-do/m-p/593791#M15571</guid>
      <dc:creator>jffeudo86</dc:creator>
      <dc:date>2019-10-03T15:54:41Z</dc:date>
    </item>
  </channel>
</rss>

