That is not a SAS ERROR, it is a SAS NOTE:
NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE
expression.
Your program will continue to run OK. If you want to avoid these notes then just add an ELSE.
Check all CASE expressions in your code. The SAS system does not issue this NOTE without cause.
There must be an issue with your syntax then. Please post your complete SAS log if you want further help.
@SAS241 wrote:
There is already an Else in my code
So either the ELSE is missing in a different CASE clause in your current query.
Or your current query is exercising a VIEW that has the incomplete CASE clause. Example:
2634 proc sql; 2635 create view v1 as 2636 select *,case when sex='M' then 'Male' when sex='F' then 'Female' end as gender 2637 from sashelp.class 2638 ; NOTE: SQL view WORK.V1 has been defined. 2639 select name,sex,gender from v1; NOTE: A CASE expression has no ELSE clause. Cases not accounted for by the WHEN clauses will result in a missing value for the CASE expression.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
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.
Ready to level-up your skills? Choose your own adventure.