x cd /pub/data/sf12000/Tools; %let pgm=agg_age0to6_momsa; filename pgm "&pgm..sas"; *--access the special sf1.agersexh table (derived from the p12 tables) to get counts of persons age 0-6 by Missouri metro areas--; libname sf1 '/pub/data/sf12000'; *---Per request from Debbie Pitts/ Dept of Health, aggregate to get person 0-6 by MSA---; proc sql; create table age0to6 as select put(county,$comet4.) as msacmsa, sum(persons) as age0_6 from sf1.moagersexh where race=' ' and hispanic=' ' and age le 6 group by msacmsa; proc print d data=age0to6; id msacmsa; format msacmsa $metro.; format age0_6 comma11.; sum age0_6; title 'Persons Aged 0-6 by MSA in Missouri'; title2 'Source: 2000 Decennial Census, SF1'; title3 'Programmed by OSEDA Under Contract With the Missouri Census Data Center'; run; filename dlmout "&pgm..csv"; %cnvtdlm(setin=age0to6,names=1) run;