<?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: Make first letter capital only in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/404694#M66940</link>
    <description>&lt;P&gt;Indeed, the solution&amp;nbsp;&lt;SPAN&gt;name=upcase(substr(name,1,1))||lowcase(substr(name,2,0)); is working well but you get a warning.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;If you want all the remaining characters of a string, there is no need to specifiy the number of characters to extract, then the correct syntax is&amp;nbsp;name=upcase(substr(name,1,1))||lowcase(substr(&lt;STRONG&gt;name,2)&lt;/STRONG&gt;);&lt;BR /&gt;Hope it helps!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Oct 2017 07:41:15 GMT</pubDate>
    <dc:creator>AudeP</dc:creator>
    <dc:date>2017-10-17T07:41:15Z</dc:date>
    <item>
      <title>Make first letter capital only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/97364#M27492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp; how do I go about making the values form a field capital for the first letter and then lower case for the rest ?&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HAVE:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;&lt;SPAN style="color: #575757; text-decoration: underline;"&gt;Name&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;BOB&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;&lt;P&gt;jim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WANT:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Name&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;&lt;P&gt;Jim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 19:44:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/97364#M27492</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2013-08-01T19:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Make first letter capital only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/97365#M27493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out the PROPCASE function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#n169kj2of5nur0n1bl1hubv55q63.htm"&gt;http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#n169kj2of5nur0n1bl1hubv55q63.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 19:58:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/97365#M27493</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2013-08-01T19:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Make first letter capital only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/97366#M27494</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name=propcase(name);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would actually change PAUL-Karl to Paul-Karl etc. with any delimiter specified in the propcase function documentation. If you really only want the very first letter of a string regardless of what the string contains to be upcased and everything else lowcased, you can do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;name=upcase(substr(name,1,1))||lowcase(substr(name,2,0));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 20:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/97366#M27494</guid>
      <dc:creator>Vince28_Statcan</dc:creator>
      <dc:date>2013-08-01T20:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Make first letter capital only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/97367#M27495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 20:03:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/97367#M27495</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2013-08-01T20:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Make first letter capital only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/255924#M57098</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/52707"&gt;@Vince28_Statcan﻿&lt;/a&gt;&amp;nbsp;I'm just trying to capitalize the first letter of the first word in a string. I'm using your suggested&amp;nbsp;code. It works, but&amp;nbsp;I'm getting the following warning. Any suggestions? Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;316 QWB4a_NOSCORE=upcase(substr(QWB4a_NOSCORE,1,1))||lowcase(substr(QWB4a_NOSCORE,2,0));&lt;BR /&gt; 317 QWB4b_NOSCORE=upcase(substr(QWB4b_NOSCORE,1,1))||lowcase(substr(QWB4b_NOSCORE,2,0));&lt;BR /&gt; 318 &lt;BR /&gt; 319 DROP&lt;BR /&gt; 320 QWB7D_1QWB7D_2QWB7D_3;&lt;BR /&gt; 321 RUN;&lt;BR /&gt; &lt;BR /&gt; NOTE: Invalid third argument to function SUBSTR at line 316 column 59.&lt;BR /&gt; NOTE: Invalid third argument to function SUBSTR at line 317 column 59.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 20:28:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/255924#M57098</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-03-10T20:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Make first letter capital only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/258602#M57367</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/52707"&gt;@Vince28_Statcan﻿&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;&lt;SPAN&gt;name=upcase(substr(name,1,1))||lowcase(substr(name&lt;/SPAN&gt;&lt;WBR /&gt;&lt;SPAN&gt;,2,0))&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do the "1,1" and the "2,0" represent&amp;nbsp;in this syntax?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 18:57:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/258602#M57367</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-03-23T18:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Make first letter capital only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/401250#M66755</link>
      <description>&lt;P&gt;Acctually, you can use propcase like this to solve your problem&lt;/P&gt;&lt;P&gt;propcase(lowcase(col),'')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BUT, you must use it in an SQL&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;create table y as&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;select namn, propcase(lowcase(namn), '') as PROPCASE&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;from x&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;propcase works differentially inte proc sql and data step&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 09:27:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/401250#M66755</guid>
      <dc:creator>LtRogers</dc:creator>
      <dc:date>2017-10-05T09:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Make first letter capital only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/404694#M66940</link>
      <description>&lt;P&gt;Indeed, the solution&amp;nbsp;&lt;SPAN&gt;name=upcase(substr(name,1,1))||lowcase(substr(name,2,0)); is working well but you get a warning.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;If you want all the remaining characters of a string, there is no need to specifiy the number of characters to extract, then the correct syntax is&amp;nbsp;name=upcase(substr(name,1,1))||lowcase(substr(&lt;STRONG&gt;name,2)&lt;/STRONG&gt;);&lt;BR /&gt;Hope it helps!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 07:41:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/404694#M66940</guid>
      <dc:creator>AudeP</dc:creator>
      <dc:date>2017-10-17T07:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Make first letter capital only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/492239#M72218</link>
      <description>&lt;P&gt;try this -&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
	fname="james";
	lname="Bond";
	name=propcase(catx('',fname,lname),'-');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Sep 2018 09:49:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-first-letter-capital-only/m-p/492239#M72218</guid>
      <dc:creator>nikhilwagh</dc:creator>
      <dc:date>2018-09-04T09:49:08Z</dc:date>
    </item>
  </channel>
</rss>

