<?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 Delete all observation before certain row in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Delete-all-observation-before-certain-row/m-p/61973#M6271</link>
    <description>hi all,&lt;BR /&gt;
&lt;BR /&gt;
if i have a dataset look something like this:&lt;BR /&gt;
&lt;BR /&gt;
Name    NRIC     Weight      Height&lt;BR /&gt;
A            XX       XXX        XXXX&lt;BR /&gt;
B            XX       XXX        XXXX&lt;BR /&gt;
:&lt;BR /&gt;
:&lt;BR /&gt;
F            XX      XXX         XXXX&lt;BR /&gt;
G           XX      XXX         XXXX&lt;BR /&gt;
&lt;BR /&gt;
and i want to delete all the observation before Name = 'F', Does anyone knows how should I code it?</description>
    <pubDate>Tue, 18 Nov 2008 15:50:44 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-11-18T15:50:44Z</dc:date>
    <item>
      <title>Delete all observation before certain row</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Delete-all-observation-before-certain-row/m-p/61973#M6271</link>
      <description>hi all,&lt;BR /&gt;
&lt;BR /&gt;
if i have a dataset look something like this:&lt;BR /&gt;
&lt;BR /&gt;
Name    NRIC     Weight      Height&lt;BR /&gt;
A            XX       XXX        XXXX&lt;BR /&gt;
B            XX       XXX        XXXX&lt;BR /&gt;
:&lt;BR /&gt;
:&lt;BR /&gt;
F            XX      XXX         XXXX&lt;BR /&gt;
G           XX      XXX         XXXX&lt;BR /&gt;
&lt;BR /&gt;
and i want to delete all the observation before Name = 'F', Does anyone knows how should I code it?</description>
      <pubDate>Tue, 18 Nov 2008 15:50:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Delete-all-observation-before-certain-row/m-p/61973#M6271</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-11-18T15:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all observation before certain row</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Delete-all-observation-before-certain-row/m-p/61974#M6272</link>
      <description>Hi Qiqi,&lt;BR /&gt;
try making a counter which is set to some value say =0 and as soon as the name='F' is encountered change the value of the counter  to say = 1. Use the output statement based on that counter.&lt;BR /&gt;
&lt;BR /&gt;
data test;&lt;BR /&gt;
   input name:$4. data1:$char10. ;&lt;BR /&gt;
   cards;&lt;BR /&gt;
A  dummy&lt;BR /&gt;
B  dummy&lt;BR /&gt;
C  dummy&lt;BR /&gt;
D  dummy&lt;BR /&gt;
E  dummy&lt;BR /&gt;
F  dummy&lt;BR /&gt;
G  dummy&lt;BR /&gt;
H  dummy&lt;BR /&gt;
;;;;&lt;BR /&gt;
   run;&lt;BR /&gt;
data d1(drop=counter);&lt;BR /&gt;
set test;&lt;BR /&gt;
retain counter;&lt;BR /&gt;
if _n_=1 then counter=0;&lt;BR /&gt;
if name ='F' then counter=1;&lt;BR /&gt;
if counter=1 or name='F';&lt;BR /&gt;
run;&lt;BR /&gt;
proc print;run;</description>
      <pubDate>Tue, 18 Nov 2008 18:09:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Delete-all-observation-before-certain-row/m-p/61974#M6272</guid>
      <dc:creator>SushilNayak</dc:creator>
      <dc:date>2008-11-18T18:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all observation before certain row</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Delete-all-observation-before-certain-row/m-p/61975#M6273</link>
      <description>If you are looking at logical order:  in EGuide, you could create an advanced filter with &lt;BR /&gt;
Name NOT LT "F"&lt;BR /&gt;
 to select the ones to keep.</description>
      <pubDate>Wed, 19 Nov 2008 02:16:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Delete-all-observation-before-certain-row/m-p/61975#M6273</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2008-11-19T02:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all observation before certain row</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Delete-all-observation-before-certain-row/m-p/61976#M6274</link>
      <description>Just to be careful: upcase(name) not lt "F"</description>
      <pubDate>Wed, 19 Nov 2008 11:22:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Delete-all-observation-before-certain-row/m-p/61976#M6274</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2008-11-19T11:22:50Z</dc:date>
    </item>
  </channel>
</rss>

