<?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: want to drop variables with same suffix in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201575#M266841</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your WHERE clause will be different in that case.&lt;/P&gt;&lt;P&gt;Instead of looking for variables that end in _C&amp;nbsp; (&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; upcase(name) like &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: purple; background-color: white;"&gt;'%^_C'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; escape &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: purple; background-color: white;"&gt;'^'&lt;/SPAN&gt;)&amp;nbsp; &lt;/P&gt;&lt;P&gt;you will want to look for variables that end in S (&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: blue; background-color: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: black; background-color: white;"&gt; upcase(name) like &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: purple; background-color: white;"&gt;'%S'&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 Mar 2015 18:52:32 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2015-03-14T18:52:32Z</dc:date>
    <item>
      <title>want to drop variables with same suffix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201568#M266834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 800+ variables.&lt;/P&gt;&lt;P&gt;some of which have the same suffix _C, ie: alpha1_C alpha1 alpha2_C alpha2 and so on...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how do i remove the ones with _C?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 17:45:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201568#M266834</guid>
      <dc:creator>aarony</dc:creator>
      <dc:date>2015-03-14T17:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: want to drop variables with same suffix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201569#M266835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to query a list of the variables to generate the list of those that you need to drop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;contents&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=have &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=contents(keep=name) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;noprint&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ; &lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;noprint&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; name &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; :droplist separated &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;' '&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; contents &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; upcase(name) like &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'%^_C'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; escape &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'^'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; want ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; have (&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=&amp;amp;droplist);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 18:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201569#M266835</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-03-14T18:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: want to drop variables with same suffix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201570#M266836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wow tom. you are a magician!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 18:26:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201570#M266836</guid>
      <dc:creator>aarony</dc:creator>
      <dc:date>2015-03-14T18:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: want to drop variables with same suffix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201571#M266837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom and Aarony,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just one suggestion! Why bother running both proc contents and proc sql? e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input a a_c b b_c c c_c;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1 2 3 4 5 6&lt;/P&gt;&lt;P&gt;6 5 4 3 2 1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; into :drops separated by ' '&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from dictionary.columns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where upcase(name) like '%^_C' escape '^' and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; libname eq "WORK" and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memname eq "HAVE"&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have (drop=&amp;amp;drops.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 18:35:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201571#M266837</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-03-14T18:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: want to drop variables with same suffix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201572#M266838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tom, &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;sorry. this is a dumb question but there are variables that ends with S.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;ie, CFV011S &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;i just wnated to drop the variables that ends with S, but it is not working. do u have any color?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 18:42:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201572#M266838</guid>
      <dc:creator>aarony</dc:creator>
      <dc:date>2015-03-14T18:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: want to drop variables with same suffix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201573#M266839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just create a macro variable at the top, and change to any letter you want in tom's code:&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;contents&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=have &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=contents(keep=name) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;noprint&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ; &lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&lt;STRONG&gt;%let change= C; /* change here to whatever alphabets you want*/&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;noprint&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; name &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; :droplist separated &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;' '&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; contents &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; upcase(name) like &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'%^_&amp;amp;change'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; escape &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'^'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; want ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; have (&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=&amp;amp;droplist);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;A _jive_internal="true" class="active_link" href="https://communities.sas.com/message-abuse!input.jspa?objectID=262031&amp;amp;objectType=2"&gt;&lt;SPAN class="jive-icon-sml jive-icon-warn"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 18:50:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201573#M266839</guid>
      <dc:creator>naveen_srini</dc:creator>
      <dc:date>2015-03-14T18:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: want to drop variables with same suffix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201574#M266840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It makes the logic clearer to the novice user.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also there are potential side effect to querying DICTIONARY tables.&amp;nbsp; Probably not in this case since both the LIBNAME and MEMNAME values are exact matches.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 18:50:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201574#M266840</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-03-14T18:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: want to drop variables with same suffix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201575#M266841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your WHERE clause will be different in that case.&lt;/P&gt;&lt;P&gt;Instead of looking for variables that end in _C&amp;nbsp; (&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; upcase(name) like &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: purple; background-color: white;"&gt;'%^_C'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; escape &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: purple; background-color: white;"&gt;'^'&lt;/SPAN&gt;)&amp;nbsp; &lt;/P&gt;&lt;P&gt;you will want to look for variables that end in S (&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: blue; background-color: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: black; background-color: white;"&gt; upcase(name) like &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: purple; background-color: white;"&gt;'%S'&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 18:52:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201575#M266841</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-03-14T18:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: want to drop variables with same suffix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201576#M266842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies for reviving this thread, but this is a recurring question, and I just posted this on linkedin and thought it belongs here too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A quick and dirty macro does the work without extra SAS code, and does more.&lt;/P&gt;&lt;P&gt;Unsure why I need the quotes, there. Probably obvious, but no time to think about it. If someone knows...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: navy; background: none repeat scroll 0% 0% lime; font-family: 'Courier New';"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; var_filter(table, string, filter); %&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: none repeat scroll 0% 0% white;"&gt;* filter can be: end, anywhere;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; string=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%upcase&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;(&amp;amp;string);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%local&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; dsid &lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;varnum&lt;/SPAN&gt; varname diff; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; dsid=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;(open(&amp;amp;table));&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; &amp;amp;dsid=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: none repeat scroll 0% 0% white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%then&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%return&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; varnum=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: none repeat scroll 0% 0% white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%to&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;(attrn(&amp;amp;dsid,nvars));&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; varname=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%upcase&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;(varname(&amp;amp;dsid,&amp;amp;varnum)));&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; diff=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%eval&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%length&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;(&amp;amp;varname) - &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%length&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;(&amp;amp;string));&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; &amp;amp;diff &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="color: teal; background: none repeat scroll 0% 0% white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%then&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%if&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%upcase&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;(&amp;amp;filter)=END&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%then&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%if&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; background: none repeat scroll 0% 0% white;"&gt;"%substr(&amp;amp;varname,&amp;amp;diff+1)"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: none repeat scroll 0% 0% white;"&gt;"&amp;amp;string"&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%then&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; &amp;amp;varname; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%if&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%upcase&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;(&amp;amp;filter)=ANYWHERE &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%then&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%if&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%index&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;(&amp;amp;varname,&amp;amp;string) &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%then&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; &amp;amp;varname; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; dsid=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;(close(&amp;amp;dsid));&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: navy; background: none repeat scroll 0% 0% lime; font-family: 'Courier New';"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: navy; background: none repeat scroll 0% 0% white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; T;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; SASHELP.CLASS;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; %&lt;STRONG&gt;&lt;EM&gt;var_filter&lt;/EM&gt;&lt;/STRONG&gt;(SASHELP.CLASS, GE, END);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: navy; background: none repeat scroll 0% 0% white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 23:42:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/want-to-drop-variables-with-same-suffix/m-p/201576#M266842</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2015-07-22T23:42:47Z</dc:date>
    </item>
  </channel>
</rss>

