<?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 data if not equal to specific informations in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423633#M12991</link>
    <description>&lt;P&gt;Yes, I only want to keep the lines&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;where size in ('Compact', 'Medium_SUV','Medium_size');&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Dec 2017 20:34:34 GMT</pubDate>
    <dc:creator>Giovani</dc:creator>
    <dc:date>2017-12-26T20:34:34Z</dc:date>
    <item>
      <title>Delete data if not equal to specific informations</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423612#M12988</link>
      <description>&lt;P&gt;Hi experts!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the data below I want to keep only the pieces of information where the Size(column) is equal to Compact, Medium_SUV, and Medium_size. Any thoughts how I can do that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; Cars;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;input&lt;/SPAN&gt; Type $ Size $&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;Colour $;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;datalines&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;Car Medium_size Yellow&lt;/P&gt;&lt;P class="p1"&gt;Car Small_size Blue&lt;/P&gt;&lt;P class="p1"&gt;Car Small_SUV White&lt;/P&gt;&lt;P class="p1"&gt;Car Compact White&lt;/P&gt;&lt;P class="p1"&gt;Car Large_SUV Blue&lt;/P&gt;&lt;P class="p1"&gt;Car Medium_SUV Gray&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2017 16:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423612#M12988</guid>
      <dc:creator>Giovani</dc:creator>
      <dc:date>2017-12-26T16:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Delete data if not equal to specific informations</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423614#M12989</link>
      <description>&lt;P&gt;Do you mean, you only want to keep those obs where size in ('&lt;SPAN&gt;Compact', 'Medium_SUV','Medium_size')?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;simple where or if statement?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;where size in ('Compact', 'Medium_SUV','Medium_size');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if&amp;nbsp;size in ('Compact', 'Medium_SUV','Medium_size');&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2017 17:05:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423614#M12989</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-12-26T17:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Delete data if not equal to specific informations</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423624#M12990</link>
      <description>&lt;P&gt;Note that your sample program truncates the values down to 8 characters.&amp;nbsp; You would need to add this statement before the INPUT statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;length size $ 10;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use either an IF or a WHERE statement to subset, as was suggested.&amp;nbsp; However, note that WHERE is not possible in your sample program, because you are inputting from raw data.&amp;nbsp; WHERE is only permitted when the source of data is already a SAS data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2017 19:40:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423624#M12990</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-12-26T19:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Delete data if not equal to specific informations</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423633#M12991</link>
      <description>&lt;P&gt;Yes, I only want to keep the lines&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;where size in ('Compact', 'Medium_SUV','Medium_size');&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2017 20:34:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423633#M12991</guid>
      <dc:creator>Giovani</dc:creator>
      <dc:date>2017-12-26T20:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Delete data if not equal to specific informations</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423741#M12995</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Cars;
length size $15.;
input Type $ Size $  Colour $;
if size in ('Compact', 'Medium_SUV','Medium_size');
datalines;
Car Medium_size Yellow
Car Small_size Blue
Car Small_SUV White
Car Compact White
Car Large_SUV Blue
Car Medium_SUV Gray
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Dec 2017 15:45:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423741#M12995</guid>
      <dc:creator>rvsidhu035</dc:creator>
      <dc:date>2017-12-27T15:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Delete data if not equal to specific informations</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423762#M12996</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Cars;
  input Type $ Size $  Colour $;
  datalines;
Car Medium_size Yellow
Car Small_size Blue
Car Small_SUV White
Car Compact White
Car Large_SUV Blue
Car Medium_SUV Gray
  run;

data want;
   set Cars;
   where Size not in ("Compact", "Medium_SUV", "Medium_size");
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Dec 2017 18:40:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423762#M12996</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-12-27T18:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Delete data if not equal to specific informations</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423797#M12997</link>
      <description>&lt;P&gt;draycut you are fantastic!!!&lt;/P&gt;&lt;P&gt;this is the best solution!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 21:10:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-data-if-not-equal-to-specific-informations/m-p/423797#M12997</guid>
      <dc:creator>Giovani</dc:creator>
      <dc:date>2017-12-27T21:10:48Z</dc:date>
    </item>
  </channel>
</rss>

