BookmarkSubscribeRSS Feed
Patrick
Opal | Level 21

@kkLaRue81 

The code I've pasted using the sample data as shared returns below result. 

....except that when copy/pasting the sample data I've missed one semicolon - add it so the data section ends with 4 such semicolons.

Patrick_0-1650337695092.png

 

If you run the code against your real data not using the $upcase3. informat then you need to ensure that all the Yes and No strings are set up uppercase YES and NO before using the whichc() function

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 15 replies
  • 3763 views
  • 3 likes
  • 4 in conversation