<?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: Question about the FIRST. variable in SAS Certification</title>
    <link>https://communities.sas.com/t5/SAS-Certification/Question-about-the-FIRST-variable/m-p/659145#M924</link>
    <description>&lt;P&gt;First. and the companion Last. work with variables on a BY statement in a data step to indicate if the current record holds a value that is "first" or "last" for that level of the By variable. These are Boolean values, with 1= True and False=0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The data as always with a BY statement needs to be sorted by the variables on the by statement and in that order unless the "notsorted" option is used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An IF statement without an assignment or "do" block of code is a subsetting if, which means only the records where the value is true are kept for the output to the data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create the data Work.one with a data step to get the values as shown, SORT the data by X and Y then run the shown code. Since you provided a PICTURE and it isn't possible to create data or code files from pictures, at least easily, I 'll leave that to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jun 2020 22:00:36 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-06-15T22:00:36Z</dc:date>
    <item>
      <title>Question about the FIRST. variable</title>
      <link>https://communities.sas.com/t5/SAS-Certification/Question-about-the-FIRST-variable/m-p/659143#M923</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zihdonv19_0-1592257138733.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/43240i3CE1AC917B64BF85/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zihdonv19_0-1592257138733.png" alt="zihdonv19_0-1592257138733.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone explain the meaning of the highlighted syntax "if First.Y;"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 21:40:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/Question-about-the-FIRST-variable/m-p/659143#M923</guid>
      <dc:creator>zihdonv19</dc:creator>
      <dc:date>2020-06-15T21:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Question about the FIRST. variable</title>
      <link>https://communities.sas.com/t5/SAS-Certification/Question-about-the-FIRST-variable/m-p/659145#M924</link>
      <description>&lt;P&gt;First. and the companion Last. work with variables on a BY statement in a data step to indicate if the current record holds a value that is "first" or "last" for that level of the By variable. These are Boolean values, with 1= True and False=0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The data as always with a BY statement needs to be sorted by the variables on the by statement and in that order unless the "notsorted" option is used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An IF statement without an assignment or "do" block of code is a subsetting if, which means only the records where the value is true are kept for the output to the data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create the data Work.one with a data step to get the values as shown, SORT the data by X and Y then run the shown code. Since you provided a PICTURE and it isn't possible to create data or code files from pictures, at least easily, I 'll leave that to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 22:00:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/Question-about-the-FIRST-variable/m-p/659145#M924</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-06-15T22:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Question about the FIRST. variable</title>
      <link>https://communities.sas.com/t5/SAS-Certification/Question-about-the-FIRST-variable/m-p/659155#M925</link>
      <description>&lt;P&gt;I find this page particularly helpful in explaining first. and last. logic, specifically the examples where they illustrate the values for each line of data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=n01a08zkzy5igbn173zjz82zsi1s.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=n01a08zkzy5igbn173zjz82zsi1s.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 22:35:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/Question-about-the-FIRST-variable/m-p/659155#M925</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-06-15T22:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Question about the FIRST. variable</title>
      <link>https://communities.sas.com/t5/SAS-Certification/Question-about-the-FIRST-variable/m-p/659185#M926</link>
      <description>Thanks. it is clear to me now.</description>
      <pubDate>Tue, 16 Jun 2020 00:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/Question-about-the-FIRST-variable/m-p/659185#M926</guid>
      <dc:creator>zihdonv19</dc:creator>
      <dc:date>2020-06-16T00:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Question about the FIRST. variable</title>
      <link>https://communities.sas.com/t5/SAS-Certification/Question-about-the-FIRST-variable/m-p/659186#M927</link>
      <description>thanks for your answer.</description>
      <pubDate>Tue, 16 Jun 2020 00:32:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/Question-about-the-FIRST-variable/m-p/659186#M927</guid>
      <dc:creator>zihdonv19</dc:creator>
      <dc:date>2020-06-16T00:32:06Z</dc:date>
    </item>
  </channel>
</rss>

