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;
Ready to join fellow brilliant minds for the SAS Hackathon?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.