<?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 convert first letter of a string to upper case without using propcase in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187120#M265734</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;Please can you tell me how can i convert the first letter of a sting to uppercase without using procase()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data h;&lt;/P&gt;&lt;P&gt;input name$;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;krishna&lt;/P&gt;&lt;P&gt;jizin&lt;/P&gt;&lt;P&gt;gayathri&lt;/P&gt;&lt;P&gt;madhav&lt;/P&gt;&lt;P&gt;neerav&lt;/P&gt;&lt;P&gt;priya&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jul 2014 06:34:38 GMT</pubDate>
    <dc:creator>KrishnaChandra</dc:creator>
    <dc:date>2014-07-21T06:34:38Z</dc:date>
    <item>
      <title>convert first letter of a string to upper case without using propcase</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187120#M265734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;Please can you tell me how can i convert the first letter of a sting to uppercase without using procase()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data h;&lt;/P&gt;&lt;P&gt;input name$;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;krishna&lt;/P&gt;&lt;P&gt;jizin&lt;/P&gt;&lt;P&gt;gayathri&lt;/P&gt;&lt;P&gt;madhav&lt;/P&gt;&lt;P&gt;neerav&lt;/P&gt;&lt;P&gt;priya&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 06:34:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187120#M265734</guid>
      <dc:creator>KrishnaChandra</dc:creator>
      <dc:date>2014-07-21T06:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: convert first letter of a string to upper case without using propcase</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187121#M265735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA WANT;&lt;/P&gt;&lt;P&gt;SET HAVE;&lt;/P&gt;&lt;P&gt;NAME2 = UPCASE(SUBSTR(LEFT(NAME),1,1))||SUBSTR(LEFT(NAME),2);&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 07:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187121#M265735</guid>
      <dc:creator>Scott_Mitchell</dc:creator>
      <dc:date>2014-07-21T07:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: convert first letter of a string to upper case without using propcase</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187122#M265736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&amp;nbsp; &lt;SPAN class="j-post-author "&gt;&lt;STRONG&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="-1" data-externalid="" data-presence="null" data-userid="818116" data-username="Scott_Mitchell" href="https://communities.sas.com/people/Scott_Mitchell" id="jive-81811621306098993306186"&gt;Scott_Mitchell&lt;/A&gt;&amp;nbsp; &lt;/STRONG&gt;&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 07:11:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187122#M265736</guid>
      <dc:creator>KrishnaChandra</dc:creator>
      <dc:date>2014-07-21T07:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: convert first letter of a string to upper case without using propcase</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187123#M265737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to note, you can modify a character in place, without have to concatenate data back together again, though you won't notice any time diff without lots of rows &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;data x;&lt;/P&gt;&lt;P&gt;&amp;nbsp; attrib res format=$20.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; res="assfsa";&lt;/P&gt;&lt;P&gt;&amp;nbsp; substr(res,1,1)=upcase(substr(res,1,1));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 09:51:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187123#M265737</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-21T09:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: convert first letter of a string to upper case without using propcase</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187124#M265738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wonder if using FIRST would make any difference&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;substr(res,1,1)=upcase(first(res));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 11:13:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187124#M265738</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-07-21T11:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: convert first letter of a string to upper case without using propcase</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187125#M265739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, excellent suggestion.&amp;nbsp; A few runs of the below two steps shows first using about 0.08 seconds less than the substr (e.g. 0.23 vs 0.31).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data x;&lt;/P&gt;&lt;P&gt;&amp;nbsp; attrib res format=$20.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to 2000000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; res="assfsa";&lt;/P&gt;&lt;P&gt;&amp;nbsp; substr(res,1,1)=upcase(first(res));&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data y;&lt;/P&gt;&lt;P&gt;&amp;nbsp; attrib res format=$20.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to 2000000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; res="assfsa";&lt;/P&gt;&lt;P&gt;&amp;nbsp; substr(res,1,1)=upcase(substr(res,1,1));&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 12:03:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187125#M265739</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-21T12:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: convert first letter of a string to upper case without using propcase</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187126#M265740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or try this one . You gotta love Peal Regular Expression .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data h;
input name$;
cards;
krishna
jizin
gayathri
madhav
neerav
priya
run;
data _null_;
set h;
name = prxchange("s/(\w+)/\u\L$1/i", -1, name);
put name=;
run;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 13:07:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/187126#M265740</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-07-21T13:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: convert first letter of a string to upper case without using propcase</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/369741#M265741</link>
      <description>&lt;P&gt;NameHard = upcase(first(Name)) || substr(Name,2,length(Name));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to get first letter in caps with upcase and first function&lt;/P&gt;&lt;P&gt;After that with substring function get the last letters with length function.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 00:26:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/369741#M265741</guid>
      <dc:creator>arpi</dc:creator>
      <dc:date>2017-06-23T00:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: convert first letter of a string to upper case without using propcase</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/427919#M265742</link>
      <description>can anyone please explain me the SUBSTR function in the code?Thank you.</description>
      <pubDate>Tue, 16 Jan 2018 05:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-first-letter-of-a-string-to-upper-case-without-using/m-p/427919#M265742</guid>
      <dc:creator>VISHNU239</dc:creator>
      <dc:date>2018-01-16T05:32:47Z</dc:date>
    </item>
  </channel>
</rss>

