<?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: simple definition of FIRST. of many variables in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/simple-definition-of-FIRST-of-many-variables/m-p/1104#M520</link>
    <description>Hermie,&lt;BR /&gt;
&lt;BR /&gt;
You shouldn't need to test multiple first.var's, as they refer to a hierarchy setup using the BY statement, e.g.:&lt;BR /&gt;
&lt;BR /&gt;
  by State City ZipCode;&lt;BR /&gt;
&lt;BR /&gt;
Where all the same State values are grouped together, with all the State-City combinations grouped together, and all the State-City-ZipCode combinations group together.&lt;BR /&gt;
&lt;BR /&gt;
Therefore first.State is also first.City and first.ZipCode, as it is the first record for a new value of State.  In a similar way first.City is also first.ZipCode, but first.ZipCode may not be first.City or first.State.&lt;BR /&gt;
&lt;BR /&gt;
To answer your question, in this case you only need to test first.State.&lt;BR /&gt;
&lt;BR /&gt;
.......Phil&lt;BR /&gt;
&lt;BR /&gt;
PS. See &lt;A href="http://v8doc.sas.com/sashtml/lrcon/z0761931.htm" target="_blank"&gt;http://v8doc.sas.com/sashtml/lrcon/z0761931.htm&lt;/A&gt; for more explanation.

&lt;BR /&gt;
Message was edited by: prholland at Jul 24, 2006 10:27 AM&lt;BR /&gt;</description>
    <pubDate>Mon, 24 Jul 2006 14:25:58 GMT</pubDate>
    <dc:creator>prholland</dc:creator>
    <dc:date>2006-07-24T14:25:58Z</dc:date>
    <item>
      <title>simple definition of FIRST. of many variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/simple-definition-of-FIRST-of-many-variables/m-p/1103#M519</link>
      <description>Dear all,&lt;BR /&gt;
to detect the first of many vars you have to specify&lt;BR /&gt;
if first.var1 and first.var2 and first.var3 and ....&lt;BR /&gt;
&lt;BR /&gt;
can this been done by something very simple ??&lt;BR /&gt;
&lt;BR /&gt;
perhaps&lt;BR /&gt;
&lt;BR /&gt;
if first.(var1 var2 var3 ....)&lt;BR /&gt;
&lt;BR /&gt;
Greetz,&lt;BR /&gt;
Herman</description>
      <pubDate>Mon, 24 Jul 2006 13:44:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/simple-definition-of-FIRST-of-many-variables/m-p/1103#M519</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-07-24T13:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: simple definition of FIRST. of many variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/simple-definition-of-FIRST-of-many-variables/m-p/1104#M520</link>
      <description>Hermie,&lt;BR /&gt;
&lt;BR /&gt;
You shouldn't need to test multiple first.var's, as they refer to a hierarchy setup using the BY statement, e.g.:&lt;BR /&gt;
&lt;BR /&gt;
  by State City ZipCode;&lt;BR /&gt;
&lt;BR /&gt;
Where all the same State values are grouped together, with all the State-City combinations grouped together, and all the State-City-ZipCode combinations group together.&lt;BR /&gt;
&lt;BR /&gt;
Therefore first.State is also first.City and first.ZipCode, as it is the first record for a new value of State.  In a similar way first.City is also first.ZipCode, but first.ZipCode may not be first.City or first.State.&lt;BR /&gt;
&lt;BR /&gt;
To answer your question, in this case you only need to test first.State.&lt;BR /&gt;
&lt;BR /&gt;
.......Phil&lt;BR /&gt;
&lt;BR /&gt;
PS. See &lt;A href="http://v8doc.sas.com/sashtml/lrcon/z0761931.htm" target="_blank"&gt;http://v8doc.sas.com/sashtml/lrcon/z0761931.htm&lt;/A&gt; for more explanation.

&lt;BR /&gt;
Message was edited by: prholland at Jul 24, 2006 10:27 AM&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Jul 2006 14:25:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/simple-definition-of-FIRST-of-many-variables/m-p/1104#M520</guid>
      <dc:creator>prholland</dc:creator>
      <dc:date>2006-07-24T14:25:58Z</dc:date>
    </item>
  </channel>
</rss>

