Date: Sat, 23 Mar 1996 00:39:34 GMT
Reply-To: Mike Harris <mikeh@AMGEN.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Mike Harris <mikeh@AMGEN.COM>
Organization: Amgen Inc.
Subject: Re: Converting lower case characters to upper case
In article <4iu94m$343@idefix.eunet.fi>, Etunimi.Sukunimi@vatt.fi (Etunimi
Sukunimi) writes:
|> I'd like to know how to convert a single lower case character of a variable
|> into upper case.
|>
|> I'm using SAS 6.10 on windows 3.1.
|>
|> Any help is appreciated!
|>
|>
|> Jyri
|>
|>
Try this statement.
UPCASE=byte(rank(LOWCASE)-32);
UPCASE is a character variable containing the uppercase value ahd LOWCASE is -
you guessed it. Convert to rank in the collating sequence, subtract the
difference between upper and lower case, and convert back to a character.
Mike Harris
mikeh@amgen.com
*** Disclaimer: These are the opinions of the poster not Amgen Inc.***
|