<?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 How to drop variables if variables' name contain certain character in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-drop-variables-if-variables-name-contain-certain/m-p/398879#M96531</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;So I have a long list of variables and I only want to keep (or drop) all variables with "Jan" or "jan".&lt;/P&gt;
&lt;P&gt;Any help is very much appreciated.&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt;input Jan1 _1_jan Feb March_ ;&lt;BR /&gt;datalines;&lt;BR /&gt;1 0 0 0&lt;BR /&gt;2 1 1 1&lt;BR /&gt;;run;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Sep 2017 17:36:53 GMT</pubDate>
    <dc:creator>hhchenfx</dc:creator>
    <dc:date>2017-09-26T17:36:53Z</dc:date>
    <item>
      <title>How to drop variables if variables' name contain certain character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-drop-variables-if-variables-name-contain-certain/m-p/398879#M96531</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;So I have a long list of variables and I only want to keep (or drop) all variables with "Jan" or "jan".&lt;/P&gt;
&lt;P&gt;Any help is very much appreciated.&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt;input Jan1 _1_jan Feb March_ ;&lt;BR /&gt;datalines;&lt;BR /&gt;1 0 0 0&lt;BR /&gt;2 1 1 1&lt;BR /&gt;;run;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 17:36:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-drop-variables-if-variables-name-contain-certain/m-p/398879#M96531</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-09-26T17:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop variables if variables' name contain certain character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-drop-variables-if-variables-name-contain-certain/m-p/398881#M96533</link>
      <description>&lt;P&gt;UNTESTED CODE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
     select distinct name into :names separated by ' ' from dictionary.columns where upcase(memname)='HAVE' and upcase(libname)='WORK'&lt;BR /&gt;     and upcase(name)?'JAN';
quit;

data want;&lt;BR /&gt;    set have (drop=&amp;amp;names);   /* OR set have (keep=&amp;amp;names); */&lt;BR /&gt;run;
&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Sep 2017 17:48:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-drop-variables-if-variables-name-contain-certain/m-p/398881#M96533</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-09-26T17:48:18Z</dc:date>
    </item>
  </channel>
</rss>

