<?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: in SAS, letter case really doesn't matter? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/in-SAS-letter-case-really-doesn-t-matter/m-p/253537#M48273</link>
    <description>&lt;P&gt;In your code case doesn't matter.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For variable values then it does matter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This means you can do the following and it won't make a difference:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;prOC MEAns data=SAShelP.ClasS;
ruN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But when testing strings and comparison, then a variable value of 'a' is different than 'A'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if var1='a' then ...;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is different than&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if var1='A' then..;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Solution, when making string comparisons, upcase or lowcase the strings before comparison.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if upcase(var1)='A' then..&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Mar 2016 17:54:24 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-03-01T17:54:24Z</dc:date>
    <item>
      <title>in SAS, letter case really doesn't matter?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/in-SAS-letter-case-really-doesn-t-matter/m-p/253531#M48268</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just got a question, need your help: &lt;STRONG&gt;letter case&lt;/STRONG&gt; in SAS seems making difference, at least in the case of "if...(then)". &amp;nbsp;Look at this example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _t_;&lt;BR /&gt;input ID Name$ bloodtype$ Weight;&lt;BR /&gt;if bloodtype='a';&amp;nbsp;&lt;BR /&gt;cards;&lt;BR /&gt;3 kelly&amp;nbsp;a&amp;nbsp;120&lt;BR /&gt;4 brown&amp;nbsp;A&amp;nbsp;200&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the result has only 1 line (&lt;SPAN&gt;3 kelly&amp;nbsp;a&amp;nbsp;120&lt;/SPAN&gt;&lt;SPAN&gt;). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if I change 'a' to 'A', then I get another line (4 brown&amp;nbsp;A&amp;nbsp;200).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;both didn't give me a result of all 2 lines.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;does this mean, in some cases, &lt;STRONG&gt;letter case&lt;/STRONG&gt; matters?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 17:48:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/in-SAS-letter-case-really-doesn-t-matter/m-p/253531#M48268</guid>
      <dc:creator>mich_ard</dc:creator>
      <dc:date>2016-03-01T17:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: in SAS, letter case really doesn't matter?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/in-SAS-letter-case-really-doesn-t-matter/m-p/253537#M48273</link>
      <description>&lt;P&gt;In your code case doesn't matter.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For variable values then it does matter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This means you can do the following and it won't make a difference:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;prOC MEAns data=SAShelP.ClasS;
ruN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But when testing strings and comparison, then a variable value of 'a' is different than 'A'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if var1='a' then ...;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is different than&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if var1='A' then..;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Solution, when making string comparisons, upcase or lowcase the strings before comparison.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if upcase(var1)='A' then..&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Mar 2016 17:54:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/in-SAS-letter-case-really-doesn-t-matter/m-p/253537#M48273</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-01T17:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: in SAS, letter case really doesn't matter?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/in-SAS-letter-case-really-doesn-t-matter/m-p/253542#M48275</link>
      <description>thank Reeza for quick reply, your answer works. I confused code case and value case. I'm a newbie.</description>
      <pubDate>Tue, 01 Mar 2016 18:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/in-SAS-letter-case-really-doesn-t-matter/m-p/253542#M48275</guid>
      <dc:creator>mich_ard</dc:creator>
      <dc:date>2016-03-01T18:04:07Z</dc:date>
    </item>
  </channel>
</rss>

