<?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: By Group Progressing in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/By-Group-Progressing/m-p/58966#M16577</link>
    <description>See if this looks right to you&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data test;&lt;BR /&gt;
   input id:$4. date:ddmmyy. action;&lt;BR /&gt;
   format date date.;&lt;BR /&gt;
   cards;&lt;BR /&gt;
1234 07/01/2008 0&lt;BR /&gt;
1234 01/06/2008 0&lt;BR /&gt;
1234 11/07/2008 0&lt;BR /&gt;
1234 16/07/2008 1&lt;BR /&gt;
1234 08/08/2008 0&lt;BR /&gt;
1234 02/10/2008 0&lt;BR /&gt;
4567 27/02/2008 0&lt;BR /&gt;
4567 22/06/2008 0&lt;BR /&gt;
4567 20/07/2008 0&lt;BR /&gt;
4567 12/09/2008 1&lt;BR /&gt;
7891 14/02/2008 0&lt;BR /&gt;
7891 08/04/2008 0&lt;BR /&gt;
7891 20/04/2008 0&lt;BR /&gt;
7891 04/07/2008 1&lt;BR /&gt;
7891 14/07/2008 0&lt;BR /&gt;
7891 27/09/2008 0&lt;BR /&gt;
7891 16/10/2008 0&lt;BR /&gt;
;;;;&lt;BR /&gt;
   run;&lt;BR /&gt;
data actioned;   &lt;BR /&gt;
   do until(last.id);&lt;BR /&gt;
      set test;&lt;BR /&gt;
      by id;&lt;BR /&gt;
      if not actioned then output;&lt;BR /&gt;
      actioned = actioned max action;&lt;BR /&gt;
      end;&lt;BR /&gt;
   drop actioned;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print;&lt;BR /&gt;
   run; &lt;BR /&gt;
&lt;BR /&gt;
[pre]</description>
    <pubDate>Fri, 31 Oct 2008 17:09:31 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2008-10-31T17:09:31Z</dc:date>
    <item>
      <title>By Group Progressing</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/By-Group-Progressing/m-p/58965#M16576</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
I have data in the following fashion (below) and want to remove all observations that happen after &lt;B&gt;action=1&lt;/B&gt; &lt;I&gt;within&lt;/I&gt; an ID group (So the bold rows below would be removed in this example).  &lt;BR /&gt;
&lt;BR /&gt;
&lt;U&gt;&lt;B&gt;ID&lt;/B&gt;&lt;/U&gt;    &lt;U&gt;&lt;B&gt;Date&lt;/B&gt;&lt;/U&gt;	 &lt;U&gt;&lt;B&gt;Action_Occurs&lt;/B&gt;&lt;/U&gt;&lt;BR /&gt;
1234	07/01/2008	0&lt;BR /&gt;
1234	01/06/2008	0&lt;BR /&gt;
1234	11/07/2008	0&lt;BR /&gt;
1234	16/07/2008	1&lt;BR /&gt;
&lt;B&gt;1234	08/08/2008	0&lt;BR /&gt;
1234	02/10/2008	0&lt;/B&gt;&lt;BR /&gt;
4567	27/02/2008	0&lt;BR /&gt;
4567	22/06/2008	0&lt;BR /&gt;
4567	20/07/2008	0&lt;BR /&gt;
4567	12/09/2008	1&lt;BR /&gt;
7891	14/02/2008	0&lt;BR /&gt;
7891	08/04/2008	0&lt;BR /&gt;
7891	20/04/2008	0&lt;BR /&gt;
7891	04/07/2008	1&lt;BR /&gt;
&lt;B&gt;7891	14/07/2008	0&lt;BR /&gt;
7891	27/09/2008	0&lt;BR /&gt;
7891	16/10/2008	0&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I have tried retain statements, if statements, first., last. etc... but can't quite crack it.  This seems a quite simple task so am quite frustrated that I can't seem to figure it out in SAS.  ANY help on this is much appreciated!  &lt;BR /&gt;
&lt;BR /&gt;
(apologies for the layout of the example data - couldn't see a way of uploading images etc...)</description>
      <pubDate>Fri, 31 Oct 2008 16:14:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/By-Group-Progressing/m-p/58965#M16576</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-10-31T16:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: By Group Progressing</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/By-Group-Progressing/m-p/58966#M16577</link>
      <description>See if this looks right to you&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data test;&lt;BR /&gt;
   input id:$4. date:ddmmyy. action;&lt;BR /&gt;
   format date date.;&lt;BR /&gt;
   cards;&lt;BR /&gt;
1234 07/01/2008 0&lt;BR /&gt;
1234 01/06/2008 0&lt;BR /&gt;
1234 11/07/2008 0&lt;BR /&gt;
1234 16/07/2008 1&lt;BR /&gt;
1234 08/08/2008 0&lt;BR /&gt;
1234 02/10/2008 0&lt;BR /&gt;
4567 27/02/2008 0&lt;BR /&gt;
4567 22/06/2008 0&lt;BR /&gt;
4567 20/07/2008 0&lt;BR /&gt;
4567 12/09/2008 1&lt;BR /&gt;
7891 14/02/2008 0&lt;BR /&gt;
7891 08/04/2008 0&lt;BR /&gt;
7891 20/04/2008 0&lt;BR /&gt;
7891 04/07/2008 1&lt;BR /&gt;
7891 14/07/2008 0&lt;BR /&gt;
7891 27/09/2008 0&lt;BR /&gt;
7891 16/10/2008 0&lt;BR /&gt;
;;;;&lt;BR /&gt;
   run;&lt;BR /&gt;
data actioned;   &lt;BR /&gt;
   do until(last.id);&lt;BR /&gt;
      set test;&lt;BR /&gt;
      by id;&lt;BR /&gt;
      if not actioned then output;&lt;BR /&gt;
      actioned = actioned max action;&lt;BR /&gt;
      end;&lt;BR /&gt;
   drop actioned;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print;&lt;BR /&gt;
   run; &lt;BR /&gt;
&lt;BR /&gt;
[pre]</description>
      <pubDate>Fri, 31 Oct 2008 17:09:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/By-Group-Progressing/m-p/58966#M16577</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2008-10-31T17:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: By Group Progressing</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/By-Group-Progressing/m-p/58967#M16578</link>
      <description>looks perfect.  thanks very much</description>
      <pubDate>Mon, 03 Nov 2008 14:30:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/By-Group-Progressing/m-p/58967#M16578</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-11-03T14:30:37Z</dc:date>
    </item>
  </channel>
</rss>

