<?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 selecting variables with similar suffix in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/selecting-variables-with-similar-suffix/m-p/736482#M229432</link>
    <description>&lt;P&gt;In my dataset, I want to create three subsets of variables with the suffix [x] [y] [z].&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If these were prefix, I knew how to do it in a data set and using (keep=prefix:). Is there an easy way for suffix?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 22 Apr 2021 17:49:42 GMT</pubDate>
    <dc:creator>Emma_at_SAS</dc:creator>
    <dc:date>2021-04-22T17:49:42Z</dc:date>
    <item>
      <title>selecting variables with similar suffix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/selecting-variables-with-similar-suffix/m-p/736482#M229432</link>
      <description>&lt;P&gt;In my dataset, I want to create three subsets of variables with the suffix [x] [y] [z].&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If these were prefix, I knew how to do it in a data set and using (keep=prefix:). Is there an easy way for suffix?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 17:49:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/selecting-variables-with-similar-suffix/m-p/736482#M229432</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-04-22T17:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: selecting variables with similar suffix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/selecting-variables-with-similar-suffix/m-p/736484#M229433</link>
      <description>&lt;P&gt;Not as easy as the : operator for the prefix.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, it can be done. A Google search will probably give you a few ways quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 17:58:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/selecting-variables-with-similar-suffix/m-p/736484#M229433</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-04-22T17:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: selecting variables with similar suffix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/selecting-variables-with-similar-suffix/m-p/736485#M229434</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately there's no easy way with a wildcard.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do this (to be adapted and applied to your situation):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
 select distinct name into: names separated by ' '
 from dictionary.columns 
 where     libname='SASHELP' 
       and memname='CLASS'
       and upcase(name) like '%HT';
quit;
%PUT &amp;amp;=names;

data want;
 set sashelp.class(drop=&amp;amp;names);
run;
/* end of program */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 18:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/selecting-variables-with-similar-suffix/m-p/736485#M229434</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-04-22T18:04:44Z</dc:date>
    </item>
  </channel>
</rss>

