<?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 find variable names that contains special symbols in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/find-variable-names-that-contains-special-symbols/m-p/570572#M160910</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to check if all my variable names in my data set contains nothing other than alphabetic letters, numbers, or underscore. I've tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;select * from dictionary.columns where libname = mylib&lt;/P&gt;&lt;P&gt;and memname&amp;nbsp; = mydata and name not like "%[0-9][A-Z][_]%";&lt;/P&gt;&lt;P&gt;So ideally if there exists a variable name that has a special letter, proc sql step will return that variable name. But I don't think I'm using the wildcard operation correctly.&lt;/P&gt;&lt;P&gt;Please help!!&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2019 14:12:07 GMT</pubDate>
    <dc:creator>laiguanyu001</dc:creator>
    <dc:date>2019-07-02T14:12:07Z</dc:date>
    <item>
      <title>find variable names that contains special symbols</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-variable-names-that-contains-special-symbols/m-p/570572#M160910</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to check if all my variable names in my data set contains nothing other than alphabetic letters, numbers, or underscore. I've tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;select * from dictionary.columns where libname = mylib&lt;/P&gt;&lt;P&gt;and memname&amp;nbsp; = mydata and name not like "%[0-9][A-Z][_]%";&lt;/P&gt;&lt;P&gt;So ideally if there exists a variable name that has a special letter, proc sql step will return that variable name. But I don't think I'm using the wildcard operation correctly.&lt;/P&gt;&lt;P&gt;Please help!!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 14:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-variable-names-that-contains-special-symbols/m-p/570572#M160910</guid>
      <dc:creator>laiguanyu001</dc:creator>
      <dc:date>2019-07-02T14:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: find variable names that contains special symbols</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-variable-names-that-contains-special-symbols/m-p/570583#M160915</link>
      <description>&lt;P&gt;Example using the FINDC function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data want;
       input word $16.;
       invalid_char_position=findc(trim(word),'abcdefghijklmnopqrstuvwxyz_','idk');
cards;
abc_def
abC_Def7_e
7eiw
_6^78
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Or, slightly less typing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    invalid_char_position=findc(trim(word),'','nk');
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Jul 2019 14:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-variable-names-that-contains-special-symbols/m-p/570583#M160915</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-02T14:36:51Z</dc:date>
    </item>
  </channel>
</rss>

