SAS Functions [12-14]
UPCASE, LOWCASE & PROPCASE
The UPCASE, LOWCASE and PROPCASE functions are quite straightforward.
You can use them to convert character values into your desired case.
- UPCASE: Convert to all upper case
- LOWCASE: Convert to all lower case
- PROPCASE: Convert to proper case (first letter of each word in uppercase and the rest of the letters in lowercase)
Let's take a look at the EXAMPLE data set below:
[Reminder: To see the EXAMPLE data set on SAS Studio, run the code in the yellow box above]
Let's apply the UPCASE, LOWCASE and PROPCASE functions to the sentence above.
Up = Upcase(Comment);
Low = Lowcase(Comment);
Prop = Propcase(Comment);
Copy and run the code from the yellow box below.
The SYMPTOMS data set contains 2 variables:
- Sickness: Type of sickness
- Symptoms: The symptoms from each sickness
Write a SAS program to find out which sickness(s) causes fatigue as a symptom.
Please note that the symptoms are not reported in a standardized case.
Need some help?