<?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: Upcase function not working in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Upcase-function-not-working/m-p/777139#M247203</link>
    <description>&lt;P&gt;According the to screenshot you included, USERID is a numeric variable. It can happen if you use a wrong variable name and the DATA step will make a variable with that spelling, numeric by default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you certain that's the name of the variable you want to transform?&lt;/P&gt;</description>
    <pubDate>Thu, 28 Oct 2021 23:02:27 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2021-10-28T23:02:27Z</dc:date>
    <item>
      <title>Upcase function not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Upcase-function-not-working/m-p/777136#M247200</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use the UPCASE function to make values in column "Login" from lowercase to uppercase, pasting it into column "USERID. my issue is im gettting blanks in return.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The layout of the Logins are 3 characters and 3 numbers, for example: aaa222, aaa333, aaa444, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like these to be: AAA222, AAA333, AAA444, etc.&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data work.people;&lt;BR /&gt;set work.people;&lt;/P&gt;&lt;P&gt;Login=upcase(USERID);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what my output looks like:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS Question.JPG" style="width: 313px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65168i9816E112A26165AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS Question.JPG" alt="SAS Question.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 22:44:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Upcase-function-not-working/m-p/777136#M247200</guid>
      <dc:creator>JibJam221</dc:creator>
      <dc:date>2021-10-28T22:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Upcase function not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Upcase-function-not-working/m-p/777138#M247202</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/207689"&gt;@JibJam221&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to use the UPCASE function to make values in column "Login" from lowercase to uppercase, pasting it into column "USERID. my issue is im gettting blanks in return.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The layout of the Logins are 3 characters and 3 numbers, for example: aaa222, aaa333, aaa444, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like these to be: AAA222, AAA333, AAA444, etc.&lt;/P&gt;
&lt;P&gt;Here is my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data work.people;&lt;BR /&gt;set work.people;&lt;/P&gt;
&lt;P&gt;Login=upcase(USERID);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is what my output looks like:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS Question.JPG" style="width: 313px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65168i9816E112A26165AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS Question.JPG" alt="SAS Question.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You have two problems. First, you are using UPCASE on a numeric variable, Userid, which is missing for all of the values your pictures shows. So you create an character value from a missing number&amp;nbsp; and default display for missing is a period, which does not have an uppercase version. Second that number would in no manner contain "aaa" and the AAA would have to come from somewhere else.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One suspects that you think Userid should have letters but for some reason it is numeric. Which means any "userid" that might have had letters somewhere has lost them when this version of the variable was created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW the reason you see a dot so far from the left margin is when you convert numeric variables without explicit controls the likely default format used is best12 and will have the dot in the 12th character position from the left.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you read your log? I bet there is a Note about "numeric values have been converted to character" somewhere which would tell you if you haven't looked lately that Userid is numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Habitual use of the construct&lt;/P&gt;
&lt;PRE&gt;data work.people;
    set work.people;&lt;/PRE&gt;
&lt;P&gt;with the same data set on set and Data statements will lead to problems if you make a logic mistake as using code this way completely replaces the source data. I suspect that may be what somewhat related to your missing Userid values.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 23:02:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Upcase-function-not-working/m-p/777138#M247202</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-28T23:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Upcase function not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Upcase-function-not-working/m-p/777139#M247203</link>
      <description>&lt;P&gt;According the to screenshot you included, USERID is a numeric variable. It can happen if you use a wrong variable name and the DATA step will make a variable with that spelling, numeric by default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you certain that's the name of the variable you want to transform?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 23:02:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Upcase-function-not-working/m-p/777139#M247203</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2021-10-28T23:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Upcase function not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Upcase-function-not-working/m-p/777140#M247204</link>
      <description>&lt;P&gt;Your description does not match what your code does. Try swapping your columns around:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Current; Login=upcase(USERID);
* Suggested; USERID=upcase(Login);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Oct 2021 23:04:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Upcase-function-not-working/m-p/777140#M247204</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-10-28T23:04:52Z</dc:date>
    </item>
  </channel>
</rss>

