x cd /pub/data/corrlst/Tools; %let pgm=zips_spanning_states; filename pgm "&pgm..sas"; *--generate a report showing ZIP codes (ZCTAs) that are in more than 1 states per the 2k census. jgb, 3/07. --*; libname corrlst '/pub/data/corrlst' access=readonly; proc sort data=corrlst.us_stzcta5_county(keep=state zcta5 pop100) out=stzip nodupkeys; by zcta5 state; run; data dups; set stzip; by zcta5; if not (first.zcta5 and last.zcta5); run; ods listing; options ls=64 nocenter nodate; footnote; title 'ZCTAs in Multiple States'; proc print; by zcta5; id zcta5; format state $state.; run;