BookmarkSubscribeRSS Feed
manya92
Fluorite | Level 6

What does lowcase and upcase fucntion mainly do ?

 

3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
Have you tried them in a program? Or looked them up in the documentation. Here's the alpha list: http://go.documentation.sas.com/?docsetId=allprodslang&docsetTarget=syntaxByType-function.htm&docset...

Cynthia
novinosrin
Tourmaline | Level 20

Assuming your question is from an intuitive sense rather than a mere purpose/task of what upcase/lowcase functions accomplishes that is converting characters to upcase(all in CAPS) and lowcase(all small letters) which I believe you would have read in the documentation and many examples online.

The intuition I am guessing you are after is when doing conditional processing or applying filter on character variables with values in mixed cases meaning some are small letters and some big and some both.

For example country-- USA,Usa,usa, UsA

Let us suppose you wanna filter the records where country equals usa. Since values are case sensitive, you are prone to get unexpected results. Therefore to make it consistent, application of upcase/lowcase functions becomes handy like

Where upcase(country)=”USA”  ; here the function temporarily converts all values to UPPER case(all CAPS) and then checks for condition to do the filtering.  I hope this gives some intuitive sense beyond what the function does. HTH

ballardw
Super User

While investigating those functions you may also want to investigate PROPCASE.

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 796 views
  • 0 likes
  • 4 in conversation