x cd /pub/data/popests/Tools; %let pgm=usbrthdth9900; filename pgm "&pgm..sas"; *--Read the birth and death counts by state for the 99-00 estimates year, creating popests.usbrthdth9900---; *---Read the birth and death by state file sent by Pop Estimates (Josie Baker) 12-5-02---; filename in '/pub/data/popests/usbrthdth9900.txt'; libname popests '/pub/data/popests'; data popests.usbrthdth9900(label='Birth and Death counts 1999-2000 for US States'); infile in dsd dlm='09'x firstobs=4; length statename $25 birthsa deathsa $16; input statename -- deathsa; set sf3x.usstcnty(keep=sumlev state areaname where=(sumlev='040' and state ne '72')); if statename ne areaname then put _all_; length brth9900 dth9900 8; label brth9900='Total Births, 7/1/99 to 7/1/00'; label dth9900='Total Deaths, 7/1/99 to 7/1/00'; keep sumlev state areaname brth9900 dth9900; format brth9900 dth9900 comma7.; brth9900= compress(birthsa,'",'); dth9900 = compress(deathsa,'",'); output; run; proc print data=popests.&pgm; title 'Listing of Birth and Death Data for US States 1999-2000'; title2 "Submitted from popests/Tools/&pgm..sas"; run;