<?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 Regarding first.(variable) and last.(variable) in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Regarding-first-variable-and-last-variable/m-p/435537#M4592</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;Can someone explain what does this mean?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FIRST_REGNUMBER=FIRST.REGNUMBER ;
LAST_REGNUMBER=LAST.REGNUMBER;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I had tried to read the explanation from different source but I am still confuse.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Feb 2018 08:11:36 GMT</pubDate>
    <dc:creator>Wken1122</dc:creator>
    <dc:date>2018-02-09T08:11:36Z</dc:date>
    <item>
      <title>Regarding first.(variable) and last.(variable)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Regarding-first-variable-and-last-variable/m-p/435537#M4592</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Can someone explain what does this mean?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FIRST_REGNUMBER=FIRST.REGNUMBER ;
LAST_REGNUMBER=LAST.REGNUMBER;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I had tried to read the explanation from different source but I am still confuse.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 08:11:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Regarding-first-variable-and-last-variable/m-p/435537#M4592</guid>
      <dc:creator>Wken1122</dc:creator>
      <dc:date>2018-02-09T08:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding first.(variable) and last.(variable)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Regarding-first-variable-and-last-variable/m-p/435546#M4593</link>
      <description>&lt;P&gt;It gives you the first/last row of a group. A quick example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data aa1;
    set sashelp.cars;
    by make;

    if first.make then
        output;
    else if last.make then
        output;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Gives you a table with only the first and last row per make in the table&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 08:26:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Regarding-first-variable-and-last-variable/m-p/435546#M4593</guid>
      <dc:creator>Criptic</dc:creator>
      <dc:date>2018-02-09T08:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding first.(variable) and last.(variable)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Regarding-first-variable-and-last-variable/m-p/435564#M4594</link>
      <description>&lt;P&gt;A temporary flag is added to the data, called first.&amp;lt;variable&amp;gt; and last.&amp;lt;variable&amp;gt; for each variable in the by group,&amp;nbsp;this flag can then be used to determine if the record is the first or last occurence within the by group.&lt;/P&gt;
&lt;P&gt;There are many guidance documents out there about this:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://onlinecourses.science.psu.edu/stat481/node/9" target="_blank"&gt;https://onlinecourses.science.psu.edu/stat481/node/9&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;For example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, as a tip, do not code all in uppercase.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 09:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Regarding-first-variable-and-last-variable/m-p/435564#M4594</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-02-09T09:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding first.(variable) and last.(variable)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Regarding-first-variable-and-last-variable/m-p/435579#M4595</link>
      <description>&lt;P&gt;Since the automatic first. and last. variables (which are created when a by statement is present in the data step) are not included in any output data, these assignments are a technique to make the values visible in the output dataset.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 10:11:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Regarding-first-variable-and-last-variable/m-p/435579#M4595</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-02-09T10:11:23Z</dc:date>
    </item>
  </channel>
</rss>

