LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 1996, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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.***


Back to: Top of message | Previous page | Main SAS-L page