<?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 multiple observations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/delete-multiple-observations/m-p/368683#M87936</link>
    <description>&lt;P&gt;dataset&amp;nbsp;&lt;/P&gt;&lt;P&gt;id include exclude&lt;/P&gt;&lt;P&gt;a . abc&lt;/P&gt;&lt;P&gt;a . xyz&lt;/P&gt;&lt;P&gt;b j abf&lt;/P&gt;&lt;P&gt;b . gtj&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output required&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a . abc,xyz&lt;/P&gt;&lt;P&gt;b j abf,gtj&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jun 2017 12:17:50 GMT</pubDate>
    <dc:creator>shivamarrora0</dc:creator>
    <dc:date>2017-06-20T12:17:50Z</dc:date>
    <item>
      <title>delete multiple observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/delete-multiple-observations/m-p/368683#M87936</link>
      <description>&lt;P&gt;dataset&amp;nbsp;&lt;/P&gt;&lt;P&gt;id include exclude&lt;/P&gt;&lt;P&gt;a . abc&lt;/P&gt;&lt;P&gt;a . xyz&lt;/P&gt;&lt;P&gt;b j abf&lt;/P&gt;&lt;P&gt;b . gtj&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output required&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a . abc,xyz&lt;/P&gt;&lt;P&gt;b j abf,gtj&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 12:17:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/delete-multiple-observations/m-p/368683#M87936</guid>
      <dc:creator>shivamarrora0</dc:creator>
      <dc:date>2017-06-20T12:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: delete multiple observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/delete-multiple-observations/m-p/368696#M87943</link>
      <description>&lt;P&gt;Its a good idea to foloow the guidance given by the Post button. &amp;nbsp;Clarify the test data and the output by describing the relation between them. &amp;nbsp;At a guess, I would say include is a list of inclusions separated by ", " and exclude is a the same. &amp;nbsp;So you want one id and two lists yes? &amp;nbsp;If so then (note how I put the test data in a datastep):&lt;/P&gt;
&lt;PRE&gt;data have; 
  infile datalines dlm="," dsd;
  input id $ include $ exclude $;
datalines;
a,,abc
a,,xyz
b,j,abf
b,,gtj
;
run;

data want (drop=include exclude);
  set have;
  length inc exc $200;
  retain inc exc;
  by id;
  if first.id then call missing(inc,exc);
  inc=ifc(include ne "",catx(',',inc,include),inc);
  exc=ifc(exclude ne "",catx(',',exc,exclude),exc);
  if last.id then output;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Jun 2017 12:56:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/delete-multiple-observations/m-p/368696#M87943</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-06-20T12:56:29Z</dc:date>
    </item>
  </channel>
</rss>

