x cd /pub/data/sf12010x/Tools; %let pgm=create_usmcds; filename pgm "&pgm..sas"; *----Generate the sf12010x.usmcds data set that gets used by the caps10c web app to do circular area profiles. jgb, 8-20-11. ---; libname sf12010x '/pub/data/sf12010x'; %macro setref(state,stab); sf12010x.&stab.selectedinv %mend setref; data sf12010x.usmcds(index=(state)); *----We just do 3 states as a test. Do all states once we have data for all the states--; set %dostates(n=51,mac=setref) open=defer; where sumlev='060'; run; proc means data=sf12010x.usmcds n sum maxdec=0; var totpop; class state; format state $state.; run;