x cd /pub/data/sf12000x/Tools; %let pgm=query_schoolkids_perocchu; filename pgm "&pgm..sas"; *--Special query: Generate a report showing school age children per occupied housing unit. Do this for all school districts within St. Charles county and for all census tracts within the county. Request from Bill Elder for Orchard Farms SD. 11/06. Coded by J. Blodgett, OSEDA.--; libname sf12000x '/pub/data/sf12000x'; title "School Age Children Per Occupied Housing Unit"; title2 "St. Charles County, MO - by Census Tract and School District Within County"; data sf12000x.temp_schoolkids; *--this dataset will be deleted. But put it here so Lance and Bill (clients) can access via uexplore/dexter.--; set sf12000x.moschlcos(where=(county='29183') keep=sumlev county esriid areaname age5_9 age10_14 age15_17 occupied_units totpop) sf12000x.motracts (where=(county='29183') keep=sumlev county tract esriid age5_9 age10_14 age15_17 occupied_units totpop) ; if occupied_units; Age5_17=sum(of age5_9 age10_14 age15_17); KidsPerUnit=age5_17/occupied_units; label KidsPerUnit='School Age Kids Per Occ Unit' Age5_17='School Age Kids (5 to 17)' occupied_units='Occupied Units'; if sumlev='140' then areaname='Tract ' ||tract; keep _char_ age5_17 totpop occupied_units kidsperunit; format KidsPerUnit 5.3; run; proc print data=_last_ label; by county sumlev notsorted; format county $mocnty.; id areaname; var totpop age5_17 occupied_units kidsPerUnit; run;