x cd /pub/data/popests/Tools; %let pgm=states_as2003; filename pgm "&pgm..sas"; *--Convert state level age (not detailed) and sex estimates for 7-1-2003. John Blodgett, OSEDA, U of Mo Outreach & Extension Under contract with the Missouri Census Data Center 3/04 --*; %let temp=; ***temp; *<====change to null value when data is no longer embargoed and is moved to popests directory--; libname popests "/pub/data/popests/&temp"; filename in "/pub/data/popests/rawdata/ST-EST2003-AS2003.csv"; *<===we downloaded the corresponding "base" pops for 4-1-2000 which are stored in a file with a similar name but ending with AS200004.csv (??). But for now we will not waste space and time converting those since they are readily available elsewhere.; data popests.us&pgm(label="US State pop ests by broad age categories by Age and Sex, 7-1-2003"); infile in dsd firstobs=2 lrecl=512; ; length SumLev $3 State $2 Reg $1 Div $1 AreaName $32 POPESTIMATE2003 POPEST2003_MALE POPEST2003_FEM UNDER5_2003_TOT UNDER5_2003_MALE UNDER5_2003_FEM AGE513_2003_TOT AGE513_2003_MALE AGE513_2003_FEM AGE1417_2003_TOT AGE1417_2003_MALE AGE1417_2003_FEM AGE1824_2003_TOT AGE1824_2003_MALE AGE1824_2003_FEM AGE16PLUS_2003_TOT AGE16PLUS_2003_MALE AGE16PLUS_2003_FEM AGE18PLUS_2003_TOT AGE18PLUS_2003_MALE AGE18PLUS_2003_FEM AGE1544_2003_TOT AGE1544_2003_MALE AGE1544_2003_FEM AGE65PLUS_2003_TOT AGE65PLUS_2003_MALE AGE65PLUS_2003_FEM AGE85PLUS_2003_TOT AGE85PLUS_2003_MALE 8; input state reg div Areaname popestimate2003--age85plus_2003_male; if _n_=1 then SumLev='010'; else sumlev='040'; format popestimate2003--age85plus_2003_male comma12.; run; proc means data=_last_ sum maxdec=0; class sumlev; var popestimate2003; run;