x cd /pub/data/popests/Tools; %let pgm=indians_kc_metro; filename pgm "&pgm..sas"; *---Pull American Indian pop counts from the nchs bridged estimate files for 1990, 2000 and 2004. For Stan Hudson, Center for Health Policy, UMC. (via tck). (Output saved in temp filetype directory for user to access via dexter to get final formatted output). ---*; libname temp '/pub/data/temp'; libname popests '/pub/data/popests' access=readonly; libname nchsbri '/pub/data/popests/nchsbri' access=readonly; libname georef '/pub/data/georef' access=readonly; data x/view=x; set nchsbri.monchsbridged19xx_sumry nchsbri.ksnchsbridged19xx_sumry nchsbri.monchsbridged20xx_sumry nchsbri.ksnchsbridged20xx_sumry ; where year in ('1990','2000','2004') and age=' ' and sumlev='050'; keep state county year amind total; run; proc sort data=x out=sorted; by county year; run; data temp.&pgm; merge sorted(in=inests) georef.cbsacos(in=inref keep=cbsa county where=(cbsa='28140')); by county; if inref; if not inests then do; put ///"****something is amiss*****"/_all_; abort abend; end; PctAmind=100*Amind/total format pctAmind 5.1; fipco=county; run; proc print data=temp.&pgm; by state; id county; format state $state. county $county.; title "Listing of temp.&pgm"; run;