<?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: Hash  case insensitive in the key in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486632#M126652</link>
    <description>If your are talking about the variable names,  SAS is normally not case sensitive. So your code should run fine without modifications. &lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 14 Aug 2018 12:32:22 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2018-08-14T12:32:22Z</dc:date>
    <item>
      <title>Hash  case insensitive in the key</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486595#M126636</link>
      <description>&lt;P&gt;/* is there a way to have upcase(key:) in order to not have case issues in the key variables */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* with SQL, the solution is&amp;nbsp;:&lt;/P&gt;&lt;P&gt;upcase(a.key)=upcase(b.key)&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; want (&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;drop&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=rc);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/*iterate left data set*/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; have ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/*declare variables from hash set*/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;length&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; rate_1 rc &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;8&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/*declare hash*/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; _n_=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;declare&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; hash hhh(dataset: &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"table_ref (keep=rate_1 BUSINESS_AREA )"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, multidata:&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'y'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;hhh.DefineKey(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'BUSINESS_AREA'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;hhh.DefineData(ALL:&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'YES'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hhh.DefineDone();&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;until&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(DerniereObservation);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; have &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=DerniereObservation;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; missing(rate_1);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rc = hhh.find(key:BUSINESS_AREA);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; rc ne &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;var =&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;while&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; (rc=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;var =rate_1*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rc = hhh.find_next();&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 09:53:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486595#M126636</guid>
      <dc:creator>bebess</dc:creator>
      <dc:date>2018-08-14T09:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Hash  case insensitive in the key</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486599#M126639</link>
      <description>&lt;P&gt;Can you not just before that step:&lt;/P&gt;
&lt;PRE&gt;data have;
  set have;
  key=upcase(key);
run;&lt;/PRE&gt;
&lt;P&gt;You might be able to do it in the same step as the hash, not sure as never used hash.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 10:03:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486599#M126639</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-14T10:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hash  case insensitive in the key</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486606#M126642</link>
      <description>&lt;P&gt;You may up case the KEY before loading the hash table. Since there will be few up cases in the KEY, it will be slightly efficient to use low case for there will be less work for the function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cheers&lt;/P&gt;
&lt;P&gt;DATASP&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 10:36:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486606#M126642</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2018-08-14T10:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Hash  case insensitive in the key</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486624#M126648</link>
      <description>&lt;P&gt;It is not possible to do what you want.&lt;/P&gt;
&lt;P&gt;If you can't upcase the values in the source table before loading it in the hash table, 2 options:&lt;/P&gt;
&lt;P&gt;1 - upcase them as you go and load the hash table row by row with &lt;FONT face="courier new,courier"&gt;hhh.add()&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;2 - If there are only 2 possible cases, try to find twice: &lt;FONT face="courier new,courier"&gt;hhh.find()&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;hhh.find(key:upcase(BUSINESS_AREA))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your question indicates messy data though; strive for clean data and you wan't have to worry about this kind of issue.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 12:01:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486624#M126648</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-08-14T12:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hash  case insensitive in the key</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486631#M126651</link>
      <description>&lt;P&gt;Thanks for your responses,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have many character variables in the key&amp;nbsp;( here an example with 2 ) &amp;nbsp;and the case issue concern the 2 tables ( the orignal table&amp;nbsp;and the ref table i want to join ) &amp;nbsp;.&lt;/P&gt;&lt;P&gt;for example i can have in the original table : All_buisness and in the ref table ALL_BUISNESS , so i need to apply either upcase/lowcase in the first but also in th second table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i found a solution by creating SAS datasets views&amp;nbsp;..... but do you know the impact in performance ... ( big datasets ...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; table_ref2 / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;view&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=table_ref2;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; table_ref;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;BUSINESS_AREA = lowcase(BUSINESS_AREA);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; have2 / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;view&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=have2;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; have;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;BUSINESS_AREA = lowcase(BUSINESS_AREA);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; have3(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;drop&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=rc);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/*iterate left data set*/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; have2 ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/*declare variables from hash set*/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;length&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; rate_1 rc &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;8&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/*declare hash*/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; _n_=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;declare&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; hash hhh(dataset: &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"&lt;FONT face="Courier New"&gt;table_ref2&lt;/FONT&gt;(keep=rate_1 BUSINESS_AREA TYPE_OF_POL )"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, multidata:&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'y'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;hhh.DefineKey(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'BUSINESS_AREA'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'TYPE_OF_POL'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;hhh.DefineData(ALL:&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'YES'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hhh.DefineDone();&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;until&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(DerniereObservation);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; have2 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=DerniereObservation;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; missing(rate_1);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rc = hhh.find(key:BUSINESS_AREA,key:TYPE_OF_POL);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; rc ne &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;var =&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;while&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; (rc=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;var =rate_1*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rc = hhh.find_next();&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 12:24:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486631#M126651</guid>
      <dc:creator>bebess</dc:creator>
      <dc:date>2018-08-14T12:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Hash  case insensitive in the key</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486632#M126652</link>
      <description>If your are talking about the variable names,  SAS is normally not case sensitive. So your code should run fine without modifications. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 14 Aug 2018 12:32:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486632#M126652</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-08-14T12:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Hash  case insensitive in the key</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486636#M126654</link>
      <description>&lt;P&gt;oh ok . it is not possible to apply the same as in SQL meaning upcase in the 2 tables directly :(.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. so i need to modify before the 2 tables for all characters variables concerned . i did'nt want to do this ,i was thinking that it could be possible in the HASH&amp;nbsp;( more efficient ? ) ... &amp;nbsp;i wanted to try something directly in the hash function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. there is more than 2 possibilities ,&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;hhh.find(key:upcase(BUSINESS_AREA))&lt;/FONT&gt; only upcase in the second table ( &lt;FONT color="#800080" face="Courier New"&gt;table_ref2&lt;/FONT&gt;) , not in the set table&amp;nbsp;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; _n_=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;declare&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; hash hhh(dataset: &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"table_ref2 (keep=rate_1 BUSINESS_AREA )"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, multidata:&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'y'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;hhh.DefineKey(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'BUSINESS_AREA'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;hhh.DefineData(ALL:&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'YES'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hhh.DefineDone();&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;until&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(DerniereObservation);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; have2 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=DerniereObservation;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; missing(rate_1);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rc = hhh.find(key:BUSINESS_AREA);&lt;/P&gt;&lt;P&gt;rc2= hhh.find(key:lowcase(BUSINESS_AREA));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 12:40:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486636#M126654</guid>
      <dc:creator>bebess</dc:creator>
      <dc:date>2018-08-14T12:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hash  case insensitive in the key</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486637#M126655</link>
      <description>&lt;P&gt;i am not talking avout SAS names but the values of the variables&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 12:42:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486637#M126655</guid>
      <dc:creator>bebess</dc:creator>
      <dc:date>2018-08-14T12:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Hash  case insensitive in the key</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486642#M126658</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/55544"&gt;@bebess&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Assuming this is about the casing of the actual values and not the variable names holding the values.&lt;/P&gt;
&lt;P&gt;Any string operation will have some impact on performance - but changing the case to align your values is something you can't avoid.&lt;/P&gt;
&lt;P&gt;Any read/write operation will impact on performance - you can code to minimize passes through the data. Below an approach how to do so.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ref;
  set sashelp.class(keep=name age);
  name=upcase(name);
run;

data have;
  set sashelp.class(drop=age);
  name=propcase(name);
run;

data want(drop=_:);

  if _n_=1 then
    do;
      /* declare the hash */
      dcl hash h1();
      h1.defineKey('name');
      h1.defineData('age');
      h1.defineDone();
      /* load the hash */
      do until(last);
        set ref end=last;
        name=lowcase(name);
        h1.ref();
      end;
    end;

  set have;

  _name_lower=lowcase(name);
  _rc=h1.find(key:_name_lower);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Aug 2018 12:49:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486642#M126658</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-08-14T12:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Hash  case insensitive in the key</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486859#M126736</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;i am not talking avout SAS names but the values of the variables&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This was not obvious from your confusing answer:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;for example i can have in the original table : All_buisness and in the ref table ALL_BUISNESS , so i need to apply either upcase/lowcase in the first but also in th second table&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 21:58:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hash-case-insensitive-in-the-key/m-p/486859#M126736</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-08-14T21:58:29Z</dc:date>
    </item>
  </channel>
</rss>

