x cd /pub/data/corrlst/Tools; %let pgm=tr2k2stltra; filename pgm "&pgm..sas"; *---Create corrlst.(&pgm): relatomg 2000 Census tracts to St. Louis area TRAs as defined by UIC in early 90s John Blodgett, OSEDA, U. of Missouri Outreach & Extension ---*; libname georef '/pub/data/georef' access=readonly; libname corrlst '/pub/data/corrlst'; proc sort data=georef.stltra90(keep=county tract tra puma rename=(tract=tract90)) out=trtra90; by county tract90; run; data merged; merge trtra90(in=in90) corrlst.motr902k(in=incorrlst); by county tract90; if in90; run; proc sort; by county tract tra; run; %corrwt(setin=merged,setout=&pgm,g1=county tract,g2=tra,wtvar=pop90a,keepwt=1) run; data corrlst.&pgm(label='2000 census tract to St. Louis TRA'); set &pgm ; where afact ge .92 or tract='3112.05'; *<---We determined that we essentially have a complete-tract correspondence except that our corr. list indicates that several tracts had slightly altered boundaries. --; *--we added the check for 3112.05 when we found that this 1-person tract was falling thru the cracks; drop afact pop90a; length traname $32 ; length grctractid $9; grctractid=substr(county,3,3)||compress(tract,'.'); traname=put(tra,$traname.); format tra $4.; run; *----Generate a CSV file that can be used by Lance Huntley to assist in generating Arcview boundary files for these areas--; filename dbfout "&pgm..dbf"; proc dbf data=corrlst.&pgm db4=dbfout; run;