<?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: delete records depending of next record condition in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114130#M31571</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for this Jagadishkatam,&lt;/P&gt;&lt;P&gt;but I am interested in not modify the input statement, because my&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; real problem is a dataset with many records.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was just a little example that I want to achieve:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the challenge here is to remove the records CAT with "rowx" when the next record in the variable COLOR is not populated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Oct 2013 12:40:31 GMT</pubDate>
    <dc:creator>michtka</dc:creator>
    <dc:date>2013-10-16T12:40:31Z</dc:date>
    <item>
      <title>delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114127#M31568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how I can delete the records with cat ="rowx", x=1-3 when the variable color in the next record is blank?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only want to keep the records cat="rowx" when the variable color in the next record&amp;nbsp; is populated....please see output* I want to achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance. &lt;/P&gt;&lt;P&gt;V.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data new;&lt;/P&gt;&lt;P&gt;input cat $1-7 color $ 9-17;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;row1&amp;nbsp; &lt;/P&gt;&lt;P&gt;subrow1 green&lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;subrow2 &lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;subrow3 red&lt;/P&gt;&lt;P&gt;row2&lt;/P&gt;&lt;P&gt;subrow1 red&lt;/P&gt;&lt;P&gt;row2&lt;/P&gt;&lt;P&gt;subrow2 &lt;/P&gt;&lt;P&gt;row3&lt;/P&gt;&lt;P&gt;subrow1&lt;/P&gt;&lt;P&gt;row3&lt;/P&gt;&lt;P&gt;subrow2 orange&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;input cat $1-7 color $9-17;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;row1&amp;nbsp; &lt;/P&gt;&lt;P&gt;subrow1 green&lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;subrow3 red&lt;/P&gt;&lt;P&gt;row2&lt;/P&gt;&lt;P&gt;subrow1 red&lt;/P&gt;&lt;P&gt;row3&lt;/P&gt;&lt;P&gt;subrow2 orange&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=want noobs;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cat&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; color&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subrow1&amp;nbsp;&amp;nbsp;&amp;nbsp; green&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subrow3&amp;nbsp;&amp;nbsp;&amp;nbsp; red&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subrow1&amp;nbsp;&amp;nbsp;&amp;nbsp; red&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subrow2&amp;nbsp;&amp;nbsp;&amp;nbsp; orange&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 11:13:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114127#M31568</guid>
      <dc:creator>michtka</dc:creator>
      <dc:date>2013-10-16T11:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114128#M31569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try the below code, i tried to control the reading of the data at the input statement and created a new variable called subcat, then we get&amp;nbsp; unique records for the data and then which ever observations are blank for color variable, they are deleted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data new;&lt;/P&gt;&lt;P&gt;input cat $1-7 / subcat $1-7 color $ 9-17;&lt;/P&gt;&lt;P&gt;if color='' then delete;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;subrow1 green&lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;subrow2&lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;subrow3 red&lt;/P&gt;&lt;P&gt;row2&lt;/P&gt;&lt;P&gt;subrow1 red&lt;/P&gt;&lt;P&gt;row2&lt;/P&gt;&lt;P&gt;subrow2&lt;/P&gt;&lt;P&gt;row3&lt;/P&gt;&lt;P&gt;subrow1&lt;/P&gt;&lt;P&gt;row3&lt;/P&gt;&lt;P&gt;subrow2 orange&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jagadish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 12:29:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114128#M31569</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2013-10-16T12:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114129#M31570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This assumption with the method is that there are no missing subrows.&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; new;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; cat $&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;-&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;7&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; color $ &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;9&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;-&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;17&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;datalines&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffc0;"&gt;row1&amp;nbsp; &lt;BR /&gt;subrow1 green&lt;BR /&gt;row1&lt;BR /&gt;subrow2 &lt;BR /&gt;row1&lt;BR /&gt;subrow3 red&lt;BR /&gt;row2&lt;BR /&gt;subrow1 red&lt;BR /&gt;row2&lt;BR /&gt;subrow2 &lt;BR /&gt;row3&lt;BR /&gt;subrow1&lt;BR /&gt;row3&lt;BR /&gt;subrow2 orange&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;;;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;; &lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; new;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;modify&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; new;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; new(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;firstobs&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;keep&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=color &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;rename&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=(color=_color));&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; cat eq: &lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'sub'&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; _color=color;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; missing(_color) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; remove;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=new;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 12:39:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114129#M31570</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-10-16T12:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114130#M31571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for this Jagadishkatam,&lt;/P&gt;&lt;P&gt;but I am interested in not modify the input statement, because my&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; real problem is a dataset with many records.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was just a little example that I want to achieve:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the challenge here is to remove the records CAT with "rowx" when the next record in the variable COLOR is not populated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 12:40:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114130#M31571</guid>
      <dc:creator>michtka</dc:creator>
      <dc:date>2013-10-16T12:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114131#M31572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brilliant data_null_ .It works. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 12:45:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114131#M31572</guid>
      <dc:creator>michtka</dc:creator>
      <dc:date>2013-10-16T12:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114132#M31573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data new;&lt;/P&gt;&lt;P&gt;input cat $1-7 color $ 9-17;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;row1 &lt;/P&gt;&lt;P&gt;subrow1 green&lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;subrow2&lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;subrow3 red&lt;/P&gt;&lt;P&gt;row2&lt;/P&gt;&lt;P&gt;subrow1 red&lt;/P&gt;&lt;P&gt;row2&lt;/P&gt;&lt;P&gt;subrow2&lt;/P&gt;&lt;P&gt;row3&lt;/P&gt;&lt;P&gt;subrow1&lt;/P&gt;&lt;P&gt;row3&lt;/P&gt;&lt;P&gt;subrow2 orange&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data new_1;&lt;/P&gt;&lt;P&gt;set new;&lt;/P&gt;&lt;P&gt;rename color = new_color;&lt;/P&gt;&lt;P&gt;cat = lag( cat );&lt;/P&gt;&lt;P&gt;if cat ^= '';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data new(keep=cat color);&lt;/P&gt;&lt;P&gt;merge new new_1;&lt;/P&gt;&lt;P&gt;if color ='' and new_color='' then delete;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 13:11:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114132#M31573</guid>
      <dc:creator>pradeepalankar</dc:creator>
      <dc:date>2013-10-16T13:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114133#M31574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry guys...but still it doesn't work in my real problem, need to thinking about it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; .&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 14:08:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114133#M31574</guid>
      <dc:creator>michtka</dc:creator>
      <dc:date>2013-10-16T14:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114134#M31575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The answer provided by data _null_ was perfect we believe, could you please let us know what is the problem you are facing. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 14:22:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114134#M31575</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2013-10-16T14:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114135#M31576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My apologize data_null_ , it works fine in my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you everyone for the answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 14:50:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114135#M31576</guid>
      <dc:creator>michtka</dc:creator>
      <dc:date>2013-10-16T14:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114136#M31577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@data _null_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please explain how this code works?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; color: #000080;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt; new;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #0000ff;"&gt;modify&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt; new;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #0000ff;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt; new(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #0000ff;"&gt;firstobs&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="background-color: #ffffff; color: #008080;"&gt;2&lt;/STRONG&gt; &lt;SPAN style="background-color: #ffffff; color: #0000ff;"&gt;keep&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;=color &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #0000ff;"&gt;rename&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;=(color=_color));&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt; cat eq: &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #800080;"&gt;'sub'&lt;/SPAN&gt; &lt;SPAN style="background-color: #ffffff; color: #0000ff;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt; _color=color;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt; missing(_color) &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #0000ff;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt; remove;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="background-color: #ffffff; color: #000080;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 18:14:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114136#M31577</guid>
      <dc:creator>helloSAS</dc:creator>
      <dc:date>2013-10-16T18:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114137#M31578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice! This would be the cleanest way of doing it. Similarly one can do the same thing using Merge or Set only, here is the merge example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; merge new new(firstobs=2 keep=color rename=(color=_color));&lt;/P&gt;&lt;P&gt;&amp;nbsp; if cat eq: 'sub' then _color=color;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if not missing(_color) then output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; drop _:;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 18:37:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114137#M31578</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-10-16T18:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114138#M31579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It just reads each obs from NEW (modify) and the next COLOR as _COLOR from NEW (SET firstobs=2).&amp;nbsp; If the next color is missing the record is removed.&amp;nbsp; &lt;A __default_attr="5068" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt; shows how the same can be written using MERGE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 19:22:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114138#M31579</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-10-16T19:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114139#M31580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;very clever data_null_, that firstobs=2 was the key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you Haikuo for show the alternative with merge, to me it is more familiar way that&lt;/P&gt;&lt;P&gt;that using modify (it his high class programming to me :smileylaugh: ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 21:08:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114139#M31580</guid>
      <dc:creator>michtka</dc:creator>
      <dc:date>2013-10-16T21:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114140#M31581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;@data _null_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the explanation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you say &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; cat eq: &lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'sub'&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; _color=color;&amp;nbsp; is it looking at sub from modify NEW or set NEW?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 01:06:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114140#M31581</guid>
      <dc:creator>helloSAS</dc:creator>
      <dc:date>2013-10-17T01:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114141#M31582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="748931" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;: You're not reading what the code is showing.&amp;nbsp; The only variable coming in from set new is _color.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 02:38:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114141#M31582</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-10-17T02:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114142#M31583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys, Hai.Kuo ,data_null_ ,&amp;nbsp; in terms of extend the problem, I&amp;nbsp; have got the next problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to remove the two rowx&amp;nbsp; when the structure dont have color in the 3rd row:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rowx&lt;/P&gt;&lt;P&gt;rowx&lt;/P&gt;&lt;P&gt;blank&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and keep the two rowx when&amp;nbsp; the structure have color in the 3rd row:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row1 &lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;blank&amp;nbsp; color &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just wrote a pice of code ***, but it doesnt work at the moment, what I am missing?&amp;nbsp; Thanks in advance. V.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****input dataset;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data new;&lt;/P&gt;&lt;P&gt;input cat $1-7 color $ 8-17;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; green&lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;row1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; red&lt;/P&gt;&lt;P&gt;row2&lt;/P&gt;&lt;P&gt;row2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; red&lt;/P&gt;&lt;P&gt;row2&lt;/P&gt;&lt;P&gt;row2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row3&lt;/P&gt;&lt;P&gt;row3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row3&lt;/P&gt;&lt;P&gt;row3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; orange&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;******&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;data want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; merge new new(firstobs=2 keep=color rename=(color=_color)) new(firstobs=3 keep=color rename=(color=_color2)) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if cat eq: ' ' then do;_color=color;_color2=_color;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if not missing(_color) and not missing (_color2) then output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; drop _:;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Oct 2013 01:21:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114142#M31583</guid>
      <dc:creator>michtka</dc:creator>
      <dc:date>2013-10-19T01:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114143#M31584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;has to be&amp;nbsp; "or" rather than "and" and it works &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Oct 2013 01:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114143#M31584</guid>
      <dc:creator>michtka</dc:creator>
      <dc:date>2013-10-19T01:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: delete records depending of next record condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114144#M31585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ups, the first run need to be removed , and the code will be OK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Oct 2013 01:33:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-records-depending-of-next-record-condition/m-p/114144#M31585</guid>
      <dc:creator>michtka</dc:creator>
      <dc:date>2013-10-19T01:33:00Z</dc:date>
    </item>
  </channel>
</rss>

