<?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: changing letter case in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/changing-letter-case/m-p/717751#M222008</link>
    <description>Thanks, this worked!</description>
    <pubDate>Mon, 08 Feb 2021 21:57:05 GMT</pubDate>
    <dc:creator>geneshackman</dc:creator>
    <dc:date>2021-02-08T21:57:05Z</dc:date>
    <item>
      <title>changing letter case</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-letter-case/m-p/717744#M222003</link>
      <description>&lt;P&gt;I have an old and a new data set that looks like this&lt;/P&gt;
&lt;P&gt;old data set&lt;/P&gt;
&lt;P&gt;id&amp;nbsp; &amp;nbsp;group&amp;nbsp; characteristics&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; age&amp;nbsp; &amp;nbsp; &amp;nbsp; 2 years old&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; age&amp;nbsp; &amp;nbsp; &amp;nbsp; 5 years old&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;new data set&lt;/P&gt;
&lt;P&gt;id&amp;nbsp; &amp;nbsp;group&amp;nbsp; characteristics&lt;/P&gt;
&lt;P&gt;3&amp;nbsp; &amp;nbsp; age&amp;nbsp; &amp;nbsp; &amp;nbsp; 3 Years old&lt;/P&gt;
&lt;P&gt;4&amp;nbsp; &amp;nbsp; age&amp;nbsp; &amp;nbsp; &amp;nbsp; 5 Years old&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to combine these two. However, as you can see, the old data set has "years" and the new data set has "Years"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I change the characteristics in my new data set so they are all lower case? Is there a simple way other than writing the same line for every characteristic? e.g.,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if characteristics eq "3 Years old" then characteristics = "3 years old"&lt;/P&gt;
&lt;P&gt;if characteristics eq "5 Years old" then characteristics = "5 years old"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a simple way to do this all at once?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 21:18:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-letter-case/m-p/717744#M222003</guid>
      <dc:creator>geneshackman</dc:creator>
      <dc:date>2021-02-08T21:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: changing letter case</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-letter-case/m-p/717745#M222004</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
new_var = lowcase(original_var);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can call it on your original variable, but it's probably a good idea to just create a new one. &lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 21:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-letter-case/m-p/717745#M222004</guid>
      <dc:creator>maguiremq</dc:creator>
      <dc:date>2021-02-08T21:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: changing letter case</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-letter-case/m-p/717746#M222005</link>
      <description>&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; characteristics = lowcase(characteristics);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are three basic character case functions in SAS: Lowcase, make all characters lower case, Upcase, make all characters upper case and Propcase, makes first letter of each "word" upper case and others lower case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are additional functions KLowcase, Kupcase and Kpropcase that do the same things for double-byte character sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 21:28:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-letter-case/m-p/717746#M222005</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-02-08T21:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: changing letter case</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-letter-case/m-p/717751#M222008</link>
      <description>Thanks, this worked!</description>
      <pubDate>Mon, 08 Feb 2021 21:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-letter-case/m-p/717751#M222008</guid>
      <dc:creator>geneshackman</dc:creator>
      <dc:date>2021-02-08T21:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: changing letter case</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-letter-case/m-p/717752#M222009</link>
      <description>Hi Ballarddw, this worked!</description>
      <pubDate>Mon, 08 Feb 2021 21:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-letter-case/m-p/717752#M222009</guid>
      <dc:creator>geneshackman</dc:creator>
      <dc:date>2021-02-08T21:58:22Z</dc:date>
    </item>
  </channel>
</rss>

