<?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: id lowercase remove in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933417#M367100</link>
    <description>&lt;P&gt;Make sure that the first three characters&amp;nbsp;&lt;U&gt;are&lt;/U&gt; uppercase, then use COMPRESS with the correct modifier:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dsn;
input ID $;
new_id = compress(upcase(substr(id,1,3)) !! substr(id,4),,'kup');
datalines;
aBC.L
ABCa.L
cDE.L
BDEna.L
bNE.L
HDF.L
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 22 Jun 2024 13:56:36 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2024-06-22T13:56:36Z</dc:date>
    <item>
      <title>id lowercase remove</title>
      <link>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933403#M367090</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dsn;
input ID $ ;
datalines;
aBC.L
ABCa.L
cDE.L
BDEna.L
bNE.L
HDF.L
;
run;


data dsn_output;
    set dsn;
new_id=compress(id,,'ku');
 proc print noobs;
   run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;without REGEX&amp;nbsp; Method required output&lt;/P&gt;
&lt;P&gt;ABC.L&lt;BR /&gt;ABC.L&lt;BR /&gt;CDE.L&lt;BR /&gt;BDE.L&lt;BR /&gt;BNE.L&lt;BR /&gt;HDF.L&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jun 2024 09:25:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933403#M367090</guid>
      <dc:creator>pavank</dc:creator>
      <dc:date>2024-06-22T09:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: id lowercase remove</title>
      <link>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933406#M367093</link>
      <description>&lt;P&gt;You are not using REGEX. I don't understand what you want.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jun 2024 10:21:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933406#M367093</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-06-22T10:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: id lowercase remove</title>
      <link>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933409#M367096</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying below output typically using functions&lt;/P&gt;
&lt;P&gt;ABC.L&lt;BR /&gt;ABC.L&lt;BR /&gt;CDE.L&lt;BR /&gt;BDE.L&lt;BR /&gt;BNE.L&lt;BR /&gt;HDF.L&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jun 2024 10:35:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933409#M367096</guid>
      <dc:creator>pavank</dc:creator>
      <dc:date>2024-06-22T10:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: id lowercase remove</title>
      <link>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933411#M367097</link>
      <description>&lt;P&gt;I showed in your last post how to pull strings apart and make some of it uppercase. It is essentially the same here, except you seem to want (but you haven't explicitly said so) to find lowercase letters. How can you do that? You would use the &lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/n1mdh2gvd5potjn14jipysvzn4o7.htm" target="_self"&gt;FINDC function&lt;/A&gt; with the modifier 'L'. See if you can put together what I did in your last post, with the FINDC function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With regards to my phrase above "but you haven't explicitly said so" — I'd like to see you explain more of the problem, rather than writing as few words as possible. Instead, write complete clear explanations. Be generous with words, be generous with your explanations, be generous with information. Its not enough to show us the input and output that you want, you need to explain in words what you want. Please start doing that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Still unexplained is: are there always 3 letters that will be capitalized, then a dot, and then another capital letter? Or can there be more than 3 letters before the dot? Please explain that part as well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jun 2024 11:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933411#M367097</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-06-22T11:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: id lowercase remove</title>
      <link>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933417#M367100</link>
      <description>&lt;P&gt;Make sure that the first three characters&amp;nbsp;&lt;U&gt;are&lt;/U&gt; uppercase, then use COMPRESS with the correct modifier:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dsn;
input ID $;
new_id = compress(upcase(substr(id,1,3)) !! substr(id,4),,'kup');
datalines;
aBC.L
ABCa.L
cDE.L
BDEna.L
bNE.L
HDF.L
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 22 Jun 2024 13:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933417#M367100</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-06-22T13:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: id lowercase remove</title>
      <link>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933426#M367103</link>
      <description>&lt;P&gt;What is the rule?&amp;nbsp; This rule works for your example data.&amp;nbsp; Take the first three characters, uppercase them and append .L.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dsn;
  input ID $ ;
  new_id=catx('.',upcase(substr(id,1,3)),'L');
datalines;
aBC.L
ABCa.L
cDE.L
BDEna.L
bNE.L
HDF.L
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result&lt;/P&gt;
&lt;PRE&gt;OBS      ID       new_id

 1     aBC.L      ABC.L
 2     ABCa.L     ABC.L
 3     cDE.L      CDE.L
 4     BDEna.L    BDE.L
 5     bNE.L      BNE.L
 6     HDF.L      HDF.L&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jun 2024 15:33:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933426#M367103</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-06-22T15:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: id lowercase remove</title>
      <link>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933517#M367142</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your solution&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 06:29:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/id-lowercase-remove/m-p/933517#M367142</guid>
      <dc:creator>pavank</dc:creator>
      <dc:date>2024-06-24T06:29:14Z</dc:date>
    </item>
  </channel>
</rss>

