<?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/439220#M109578</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Thank you for your reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In value variable if the data is . from red1 to redn(lab variable) then I don't want that observations in the output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if the variable value has . and any value(alphabets,dates,numerics)even at once,then I want the output for lab variable for red1 to redn observations for that specific occurrence (red1 to redn) only. Can you kindly let me know how to get this kind of output for huge data with unknown observations.Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2018 10:45:24 GMT</pubDate>
    <dc:creator>Goud1</dc:creator>
    <dc:date>2018-02-22T10:45: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/439207#M109570</link>
      <description>&lt;P&gt;input dataset as below:&lt;/P&gt;&lt;P&gt;data ds;&lt;BR /&gt;input idno 1-4 visit $ 6-11 lab $17-20 value;&lt;BR /&gt;cards;&lt;BR /&gt;Su01 visit1 red1 .&lt;BR /&gt;Su01 visit1 red2 .&lt;BR /&gt;Su01 visit1 red3 .&lt;BR /&gt;Su01 visit1 red4 .&lt;BR /&gt;Su01 visit1 red1 200&lt;BR /&gt;Su01 visit1 red2 10&lt;BR /&gt;Su01 visit1 red3 .&lt;BR /&gt;Su01 visit1 red4 .&lt;BR /&gt;Su01 visit1 red5 .&lt;BR /&gt;Su01 visit1 red6 .&lt;BR /&gt;Su01 visit1 red7 150&lt;BR /&gt;Su02 visit1 red1 300&lt;BR /&gt;Su02 visit1 red2 45&lt;BR /&gt;Su02 visit1 red3 .&lt;BR /&gt;Su02 visit1 red4 30&lt;BR /&gt;Su02 visit1 red1 200&lt;BR /&gt;Su02 visit1 red2 10&lt;BR /&gt;Su02 visit1 red3 .&lt;BR /&gt;Su02 visit1 red4 .&lt;BR /&gt;Su02 visit1 red5 150&lt;BR /&gt;Su02 visit1 red6 250&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Su03 visit1 red1 .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Su03 visit1 red2 .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Su03 visit1 red3 .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Su03 visit1 red4 .&lt;/SPAN&gt;&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output should be as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;idno&amp;nbsp; &amp;nbsp;visit&amp;nbsp; &amp;nbsp;lab&amp;nbsp; &amp;nbsp; value&lt;/P&gt;&lt;P&gt;Su01 visit1 red1 200&lt;BR /&gt;Su01 visit1 red2 10&lt;BR /&gt;Su01 visit1 red3 .&lt;BR /&gt;Su01 visit1 red4 .&lt;BR /&gt;Su01 visit1 red5 .&lt;BR /&gt;Su01 visit1 red6 .&lt;BR /&gt;Su01 visit1 red7 150&lt;BR /&gt;Su02 visit1 red1 300&lt;BR /&gt;Su02 visit1 red2 45&lt;BR /&gt;Su02 visit1 red3 .&lt;BR /&gt;Su02 visit1 red4 30&lt;BR /&gt;Su02 visit1 red1 200&lt;BR /&gt;Su02 visit1 red2 10&lt;BR /&gt;Su02 visit1 red3 .&lt;BR /&gt;Su02 visit1 red4 .&lt;BR /&gt;Su02 visit1 red5 150&lt;BR /&gt;Su02 visit1 red6 250&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px;"&gt;In value variable if the data is . from red1 to redn(lab variable) then I don't want that observations in the output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if the variable value has . and any value(alphabets,dates,numerics)even at once,then I want the output for lab variable for red1 to redn observations for that specific occurrence (red1 to redn) only. Can you kindly let me know how to get this kind of output for huge data with unknown observations.T&lt;/SPAN&gt;hank you in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 16:10:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/439207#M109570</guid>
      <dc:creator>Goud1</dc:creator>
      <dc:date>2018-02-22T16:10:41Z</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/439215#M109573</link>
      <description>&lt;P&gt;It seems like you simply don't want the first 4 observations (which is easy to code) but I think you'll have to be specific about why you want them excluded for us to give you meaningful code&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 10:19:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/439215#M109573</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2018-02-22T10:19:26Z</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/439218#M109576</link>
      <description>&lt;P&gt;Repeating a not very well described problem will most likely not yield better answers.&lt;/P&gt;
&lt;P&gt;Other post: &lt;A href="https://communities.sas.com/t5/General-SAS-Programming/how-to-remove-a-specific-range-of-observations-from-different/m-p/439174#M54389" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/how-to-remove-a-specific-range-of-observations-from-different/m-p/439174#M54389&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13481"&gt;@community_moderator&lt;/a&gt; Please merge the posts.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 10:43:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/439218#M109576</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-02-22T10:43: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/439220#M109578</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you for your reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In value variable if the data is . from red1 to redn(lab variable) then I don't want that observations in the output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if the variable value has . and any value(alphabets,dates,numerics)even at once,then I want the output for lab variable for red1 to redn observations for that specific occurrence (red1 to redn) only. Can you kindly let me know how to get this kind of output for huge data with unknown observations.Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 10:45:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/439220#M109578</guid>
      <dc:creator>Goud1</dc:creator>
      <dc:date>2018-02-22T10:45: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/439223#M109579</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I couldn't found the merge option to merge the posts.i have updated my reply. thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 10:54:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/439223#M109579</guid>
      <dc:creator>Goud1</dc:creator>
      <dc:date>2018-02-22T10:54:20Z</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/439231#M109584</link>
      <description>&lt;P&gt;Try using lag(), or retain to keep variabel values across the observations and add logic to keep och remove records depending on previous records.&lt;/P&gt;
&lt;P&gt;//Fredrik&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 11:30:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/439231#M109584</guid>
      <dc:creator>FredrikE</dc:creator>
      <dc:date>2018-02-22T11:30:54Z</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/439341#M109621</link>
      <description>&lt;P&gt;Thank you for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried but couldn't get the required output.if possible can you kindly send the sample program code.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 16:08:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/439341#M109621</guid>
      <dc:creator>Goud1</dc:creator>
      <dc:date>2018-02-22T16:08:14Z</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/439555#M109702</link>
      <description>&lt;P&gt;Can anyone kindly help me in getting the required output,if possible with the syntax. Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 01:38:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/439555#M109702</guid>
      <dc:creator>Goud1</dc:creator>
      <dc:date>2018-02-23T01:38:32Z</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/439590#M109722</link>
      <description>&lt;P&gt;If I understood what you mean.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ds;
input idno $ visit $  lab $value;
cards;
Su01 visit1 red1 .
Su01 visit1 red2 .
Su01 visit1 red3 .
Su01 visit1 red4 .
Su01 visit1 red1 200
Su01 visit1 red2 10
Su01 visit1 red3 .
Su01 visit1 red4 .
Su01 visit1 red5 .
Su01 visit1 red6 .
Su01 visit1 red7 150
Su02 visit1 red1 300
Su02 visit1 red2 45
Su02 visit1 red3 .
Su02 visit1 red4 30
Su02 visit1 red1 200
Su02 visit1 red2 10
Su02 visit1 red3 .
Su02 visit1 red4 .
Su02 visit1 red5 150
Su02 visit1 red6 250
Su03 visit1 red1 .
Su03 visit1 red2 .
Su03 visit1 red3 .
Su03 visit1 red4 .
;
run;
data have;
 set ds;
 by idno;
 if first.idno or lab='red1' then group+1;
run;
proc sql;
select *
 from have
  group by group
   having n(value) ne 0;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Feb 2018 05:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/439590#M109722</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-02-23T05:29: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/439628#M109730</link>
      <description>&lt;P&gt;A big thank you for your reply with syntax.it helped me so much.&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 08:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-specific-group-of-observations/m-p/439628#M109730</guid>
      <dc:creator>Goud1</dc:creator>
      <dc:date>2018-02-23T08:52:54Z</dc:date>
    </item>
  </channel>
</rss>

