What does lowcase and upcase fucntion mainly do ?
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
While investigating those functions you may also want to investigate PROPCASE.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.