x cd /pub/data/sf12010/Tools; %let pgm=create_usdata_files; filename pgm "&pgm..sas"; *<============NOT CURRENT -- these views took way too long to run. We redefined these when the national file was processed so they became views from a single data set each. Pretend this setup never happened. jgb, 11-3-11 ========================; *---Now that we have data for all the states (in the inventory data sets) we create some national files by concatenating data from all states. And, perhaps, by aggregating (not sure??)/. jgb, U of Missouri, Mo Census Data Center, Aug. 2011. ---*; libname sf12010 '/pub/data/sf12010'; libname sf1 (sf12010); %macro setref(state,stab); sf12010.&stab.inventory %mend setref; data sf12010.usstcnty/view=sf12010.usstcnty; set %dostates(n=51,mac=setref) open=defer; where sumlev in ('040','050') and geocomp='00'; drop tract bg block concit aian: aihh: ait: ttract tblkgrp anrc anrccc cbsapci ua: UrbanRur cd111 sldl sldu vtd vtdi zcta5 submcd: sd: place: cousub: partflag memi nmemi; run; proc freq data=sf12010.usstcnty(keep=state sumlev); table state*sumlev; title2 "Freq Table Based on sf12010.usstcnty"; run; data sf12010.usplaces/view=sf12010.usplaces; set %dostates(n=51,mac=setref) open=defer; where sumlev='160'; drop county cnty: cousub: tract concit aian: aihh: ait: ttract bg block tblkgrp anrc anrccc ua: UrbanRur cd111 sldl sldu cbsa cbsasc csa metdiv necta: cnecta vtd vtdi zcta5 submcd: sd: partflag memi nmemi; run; proc freq data=sf12010.usplaces(keep=state lsadc); table state*lsadc; title2 "Freq Table Based on sf12010.usplaces"; run;