x cd /pub/data/corrlst/Tools; %let pgm=moblock00_10grc; filename pgm "&pgm..sas"; *---Convert the 2000-block to 2010 block equivalency file from J. Harlan GRC to sas data set. ---; *---Per source the "xfact" variable are based on spatial overlays that take into account street newtwork density. So this should be better than the list we got from the blkrel10 data which was based entirely on total area. --; *--Rerun with modified input file from J. Harlan sent Sun 3-18-12----; libname corrlst '/pub/data/corrlst'; filename dbfin '/pub/data/corrlst/block00-10.dbf'; options compress=no; ***proc dbf db4=dbfin out=moblock00_10grc; proc import datafile=dbfin dbms=dbf replace out=moblock00_10grc; getdel=no; run; title "&pgm.: 2000 to 2010 Block Equivalency Dataset"; data two; set; length county00 $5 tract00 $7 blk00 $4 county10 $5 tract10 $7 blk10 $4 afact 5; county00=substr(geoid00,1,5); tract00=substr(geoid00,6,4)||'.'||substr(geoid00,10,2); blk00=substr(geoid00,12,4); county10=substr(geoid00,1,5); tract10=substr(geoid10,6,4)||'.'||substr(geoid10,10,2); blk10=substr(geoid10,12,4); *----Totally stumped by what is going on whereby the value of xfact was off by a factor of 10 from what was in the dbf file.??-; ***xfact=.1*xfact; format xfact 6.4; if xfact > .99 then xfact=1; else if xfact < .01 then delete; afact=xfact; drop geoid00 geoid10 xfact; run; proc sort data=two out=corrlst.moblock00_10grc(label='2000 to 2010 Mo block equivalency file from GRC' index=(county00)); by county00 tract00 blk00; run; proc print data=corrlst.moblock00_10grc(where=(county00='29001')); by county00 tract00; id county00 tract00; run;