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

 

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
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
  • 5839 views
  • 3 likes
  • 4 in conversation