x cd /pub/data/acs2007/Tools; %let pgm=mcdcprofiles_fixgeos; filename pgm "&pgm..sas"; *---Re-merge the allgeos data set with the usmscdcprofiles (both 1yr and 3yr) to improve the geocodes. Hopefully, juist a 1-shot fix being run 1-10-09, jgb----------------; libname acs2007 '/pub/data/acs2007'; proc sort data=acs2007.allgeos force; by geoid; run; options compress=binary; * compresses all the datasets; %macro fixgeos(period=3yr); data acs2007.usmcdcprofiles&period.2 ; merge acs2007.allgeos&period(in=ingeos drop=name rename=(areaname=_areaname)) acs2007.usmcdcprofiles&period(in=indata ); by geoid; if not (ingeos and indata) then do; put '***geo not found on 1 set: ' ingeos= indata= geoid= areaname= ; delete; end; if ingeos then AreaName=_areaname; drop _: ; run; %mend fixgeos; options mprint; %fixgeos(period=); %***fixgeos(period=3yr); *****datasets will be manually renamed to usmcdcprofiles and usmcdcprofiles3yr after run is confirmed to have worked******; *--renaming complete, jgb, 9:23AM 1-10-09---;