title: SAS - Drop observations once a condition is met, by ID
body: <p>For each ID, I want to drop all observations that come after a dummy variable takes the value 1. An example would be:</p>
  
  <p>The data I have: </p>
  
  <pre><code>ID  TIME    DUMMY 
  1   1       0
  1   2       0
  1   3       1
  1   4       0
  2   1       0
  2   2       0
  2   3       1
  3   1       1
  3   2       0
  3   3       0
  </code></pre>
  
  <p>The output I want: </p>
  
  <pre><code>ID  TIME    DUMMY 
  1   1       0
  1   2       0
  1   3       1
  2   1       0
  2   2       0
  2   3       1
  3   1       1
  </code></pre>