x cd /pub/data/georef/Tools; %let pgm=gen_usbbbb2010; filename pgm "&pgm..sas"; *---Generate georef.usbbbb2010: a data set containing block-based bounding box data for all US states and counties. We plan to access this data set in our 2010 vintage CAPS apps that use it to restrict searches to specific states and counties based on their bounding box coordinates. We use the block level data from pl94 to get coordinates for blocks. Note that the equivalent file for 2000 vintage geography is stored in the mable2k filetype collection. John Blodgett, OSEDA, Aug. 2011. ---*; libname pl942010 '/pub/data/pl942010' access=readonly; libname georef '/pub/data/georef'; %macro doit(state,stab); proc summary data=pl942010.&stab.sums(keep=sumlev state county intptlat intptlon where=(sumlev='750')); by state; class county; var intptlat intptlon; output out=&stab.boxes(drop=_type_ _freq_) min=minlat minlon max=maxlat maxlon; run; %mend doit; %dostates(n=52); %macro refset(state,stab); &stab.boxes %mend refset; data georef.usbbbb2010(label="Bounding boxes for US states & counties per pl94 2010"); set %dostates(n=52,mac=refset) open=defer; if county=' ' then SumLev='040'; else SumLev='050'; run; proc freq data=georef.usbbbb2010; table state*sumlev; run;