<?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: How to delete specific group of observations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464586#M285115</link>
    <description>&lt;P&gt;it was my mistake too. Anyway, safe bet is to switch to datastep. Be right back in 30 mins if somebody else hasn;t answered by then&lt;/P&gt;</description>
    <pubDate>Wed, 23 May 2018 21:57:24 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2018-05-23T21:57:24Z</dc:date>
    <item>
      <title>How to delete specific group of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464579#M285112</link>
      <description>&lt;P&gt;Good afternoon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wonder if someone could provide some assistance with this? What I need is to compare groups of records to find the minimum value for each group&amp;nbsp;and delete the record with the minimum value (easy). However, if the group hours are the same over the entire group I need to keep them all. In the example provided in record 9482 both records would need to be kept. For record 28552 only the record for week 1 should be deleted since 1 hour is less than all the other records for 28552 (therefore it's the minimum). Week 8 also has a minimum hours of 1 but only the first should be removed. Once a deletion over the group has been performed group checking ceases. For record group 30799 I would keep both.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using EG 7.15.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would very much appreciate any help someone out there might be willing to provide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 21:23:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464579#M285112</guid>
      <dc:creator>Jeff_DOC</dc:creator>
      <dc:date>2018-05-23T21:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete specific group of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464583#M285113</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input RECORD	WEEK	HOURS;
cards;
9482	0	1
9482	1	1
28552	0	1
28552	1	1.5
28552	2	1.5
28552	3	1.5
28552	4	1.5
28552	5	1.5
28552	6	1.5
28552	7	1.5
28552	8	1.5
28552	9	1.5
28552	10	1.5
28552	12	1.5
29198	3	1.5
29198	4	1.5
29198	5	1.5
29198	6	1.5
29198	7	1.5
29198	8	1
29198	9	1.5
29198	10	1.5
29198	12	1.5
30799	5	1.5
30799	6	1.5
30799	7	1.5
30799	8	1.5
30799	9	1.5
30799	10	1.5
30799	12	1.5
33635	0	2
33635	1	2
33635	2	2
33635	3	2
33635	4	2
33635	5	2
33635	6	2
33635	7	2
33635	8	2
33635	9	2
33635	10	2
33635	12	2
38239	12	1.5
49749	3	1.5
49749	4	1.5
49749	5	1.5
49749	6	1.5
49749	7	1.5
49749	8	1.5
49749	9	1.5
50335	2	1.5
50335	3	1.5
50335	4	1.5
50335	5	1.5
50335	6	1.5
50335	7	1.5
50335	8	1.5
50335	9	1.5
50335	10	1.5
50335	12	1.5
59024	0	1.5
59024	1	1.5
59024	2	1.5
59024	3	1.5
59024	4	1.5
59024	5	1.5
59024	6	1.5
59024	7	1.5
59024	8	1.5
59024	9	1.5
59024	10	1.5
59024	12	1.5
62270	1	1.5
62270	2	1.5
62270	3	1.5
62270	4	1.5
62270	5	1.5
62270	6	1.5
62270	7	1.5
62270	8	1.5
62270	9	1.5
;


proc sql;
create table want as
select *
from have
group by RECORD
having std(HOURS)=0 or min(hours) ne hours;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Might require slight tweaking but i am gonna wait for your feedback first. I am little too tired to dig deep but will do so interactively&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 21:43:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464583#M285113</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-05-23T21:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete specific group of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464584#M285114</link>
      <description>&lt;P&gt;That works great except I gave you incomplete information, sorry. In the group pasted below the provided code removes all the 1 hour records instead of just the first. So I guess it only needs to make one deletion over the group.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry about that. My mistake.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="192" style="width: 144pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL width="64" style="width: 48pt;" span="3" /&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD width="64" height="20" style="border: 0.5pt solid windowtext; border-image: none; width: 48pt; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;RECORD&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="64" style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: windowtext windowtext windowtext black; width: 48pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;WEEK&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="64" style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: windowtext windowtext windowtext black; width: 48pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;HOURS&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black windowtext windowtext; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;275487&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;0&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black windowtext windowtext; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;275487&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black windowtext windowtext; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;275487&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black windowtext windowtext; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;275487&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;3&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black windowtext windowtext; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;275487&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;4&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black windowtext windowtext; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;275487&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;5&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black windowtext windowtext; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;275487&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black windowtext windowtext; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;275487&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;7&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black windowtext windowtext; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;275487&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;8&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black windowtext windowtext; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;275487&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;9&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black windowtext windowtext; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;275487&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;10&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black windowtext windowtext; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;275487&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;12&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black windowtext windowtext black; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Wed, 23 May 2018 21:50:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464584#M285114</guid>
      <dc:creator>Jeff_DOC</dc:creator>
      <dc:date>2018-05-23T21:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete specific group of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464586#M285115</link>
      <description>&lt;P&gt;it was my mistake too. Anyway, safe bet is to switch to datastep. Be right back in 30 mins if somebody else hasn;t answered by then&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 21:57:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464586#M285115</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-05-23T21:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete specific group of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464587#M285116</link>
      <description>&lt;P&gt;Feeling the eyestrain&amp;nbsp; and tiredness at 5:20pm . so requesting you to Kindly test thoroughly&amp;nbsp; and let me know. I will clean up the code for you if you want&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input RECORD	WEEK	HOURS;
cards;
9482	0	1
9482	1	1
28552	0	1
28552	1	1.5
28552	2	1.5
28552	3	1.5
28552	4	1.5
28552	5	1.5
28552	6	1.5
28552	7	1.5
28552	8	1.5
28552	9	1.5
28552	10	1.5
28552	12	1.5
29198	3	1.5
29198	4	1.5
29198	5	1.5
29198	6	1.5
29198	7	1.5
29198	8	1
29198	9	1.5
29198	10	1.5
29198	12	1.5
30799	5	1.5
30799	6	1.5
30799	7	1.5
30799	8	1.5
30799	9	1.5
30799	10	1.5
30799	12	1.5
33635	0	2
33635	1	2
33635	2	2
33635	3	2
33635	4	2
33635	5	2
33635	6	2
33635	7	2
33635	8	2
33635	9	2
33635	10	2
33635	12	2
38239	12	1.5
49749	3	1.5
49749	4	1.5
49749	5	1.5
49749	6	1.5
49749	7	1.5
49749	8	1.5
49749	9	1.5
50335	2	1.5
50335	3	1.5
50335	4	1.5
50335	5	1.5
50335	6	1.5
50335	7	1.5
50335	8	1.5
50335	9	1.5
50335	10	1.5
50335	12	1.5
59024	0	1.5
59024	1	1.5
59024	2	1.5
59024	3	1.5
59024	4	1.5
59024	5	1.5
59024	6	1.5
59024	7	1.5
59024	8	1.5
59024	9	1.5
59024	10	1.5
59024	12	1.5
62270	1	1.5
62270	2	1.5
62270	3	1.5
62270	4	1.5
62270	5	1.5
62270	6	1.5
62270	7	1.5
62270	8	1.5
62270	9	1.5
275487	0	1
275487	1	1
275487	2	1
275487	3	1
275487	4	1
275487	5	1
275487	6	1
275487	7	1
275487	8	2
275487	9	2
275487	10	2
275487	12	2
;
data want;
do _n_=1 by 1 until(last.record);
set have;
by record notsorted;
array t(100);
t(_n_)=hours;
min=min(min,hours);
if last.record then std=std(of t(*));
end;
do _n_=1 by 1 until(last.record);
set have;
if _n_=1 then call missing(f);
by record notsorted;
if std=0 then output;
else  if std ne 0 and  min=hours and not f then  f=_n_;
if std ne 0 and f and _n_&amp;gt;f then output;
end;
drop t: f std;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 22:17:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464587#M285116</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-05-23T22:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete specific group of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464590#M285117</link>
      <description>Thank you so much.</description>
      <pubDate>Wed, 23 May 2018 22:21:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464590#M285117</guid>
      <dc:creator>Jeff_DOC</dc:creator>
      <dc:date>2018-05-23T22:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete specific group of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464591#M285118</link>
      <description>&lt;P&gt;Not sure if&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;'s revised code does what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since his original code did, except for your new criterion, I'd go with:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data need;
  set have;
  by record;
  recnum=_n_;
run;

proc sql;
  create table want as
    select *
      from need
        group by RECORD
          having std(HOURS)=0 or 
          min(hours) ne hours or
          (min(hours) eq hours and recnum ne min(recnum))
  ;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 22:25:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464591#M285118</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-05-23T22:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete specific group of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464593#M285119</link>
      <description>&lt;P&gt;This works art297. I misread the results. Thank you both very much for all your&amp;nbsp;assistance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 22:38:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464593#M285119</guid>
      <dc:creator>Jeff_DOC</dc:creator>
      <dc:date>2018-05-23T22:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete specific group of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464594#M285120</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp; Thank you. Yours is neat.&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;solution is great&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;just to correct:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
do _n_=1 by 1 until(last.record);
set have;
by record notsorted;
array t(100);
t(_n_)=hours;
min=min(min,hours);
if last.record then std=std(of t(*));
end;
do _n_=1 by 1 until(last.record);
set have;
if _n_=1 then call missing(f);
by record notsorted;
if std=0 then output;
else  if std ne 0 and  min=hours and not f then  f=_n_;
if std ne 0 and f and _n_&amp;gt;f  then output;
else  if std ne 0 and min ne hours then output;
end;
drop t: f std;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 May 2018 22:39:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/464594#M285120</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-05-23T22:39:26Z</dc:date>
    </item>
  </channel>
</rss>

