%include '/pub/sas/autoexec.sas'; %let tgrpath=%str(/home/riceg/geocorr_adds/tgrlnfaces); libname user '/home/riceg/geocorr_adds/temp'; libname input '/home/riceg/geocorr_adds/input'; libname output '/home/riceg/geocorr_adds/output'; libname georef '/pub/data/georef' access=readonly; options nomprint nomlogic nosymbolgen nospool; /* comment out after running once: ================================ *-- We begin by creating a slightly edited version of the georef.cbsaco15. ; data user.cbsacos15alt(label="Edited to split Bedford County into pre-2014 defn"); set georef.cbsacos15 ; fipco16=fipco; if fipco='51019' then do; *-- We got the 6,533 estimate value from our popests.ussc17 data set ; popjl16=popjl16- 6533; *-- This is the old defn without the Beford City pop, which we subtract. ; output; fipco='51515'; *-- This is the old Bedford (Independent) city---; county=fipco; popjl16=6533; output; end; else output; *--all other counties just copy as-is --*; keep state fipco cbsa metrodiv county csa cbsatype Year PopJL16 Central; run; proc sort; by state fipco; run; ==================================== */ %macro doit(state,stab); data user.&stab._pop2016; set user.cbsacos15alt; if state = &state; run; data output.&stab.cocds1 (index=(county)); merge input.&stab.cocds1 user.&stab._pop2016; by county; PopGrowthFactor=PopJL16/coPop10; stab = "&stab"; rename PopJL16=coPopJL16; run; %mend doit; /* Comment out ================================= %*-- Do full run beginning 10/31/2018: ; %dostates(01 02 04 05 06 08 09 10 11 12,msgs=1); %dostates(13 15 16 17 18 19 20 21 22 23 24 25 26 27 28,msgs=1); %dostates(29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 45 46 47,msgs=1); %dostates(48 49 50 53 54 55 56,msgs=1) ; %dostates(51,msgs=1) ; ================================= End commented out */ %dostates(51,msgs=1) ;