Regarding grouping: proc sql; create table want as select ( case when CITY in ('Wallsend', 'Heaton', . . . .more names . . . ) then 'Newcastle' when CITY in (. . . . some other towns to group together ) then 'Something else' . . . . more when statements . . . else 'All others' end ) as town_grp from have group by town_grp ; quit; This won't address your need to group similiarly-spelled towns together. For this, you could consider using the SOUNDEX, SPEEDIS, COMPLEV, or COMPGED functions. Here is one link (of many on the web) giving an overview of the different comparison functions available in SAS. http://www.nesug.org/Proceedings/nesug11/ap/ap07.pdf
... View more