The mean function ignores missing values, so you can use it in a proc sql to obtain what you want.
proc sql;
create table want as
select city , mean(days) as mean from have
group by city;
quit;
Register Today!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.