/* Update the mable22 datasets and views used by the geocorr 2022 web application. Moving county size category codes out of the blocks datasets and into the counties. July 7, 2025 */ %include '/pub/sas/autoexec.sas'; options fmtsearch=(mable22 sasctlgs); options nosource nosource2 nomprint nomlogic nosymbolgen notes; libname mable22 '/pub/data/mable22' compress=char; %macro doit(state,stab); data &stab._blocks (drop=CountySC); set mable22.&stab._blocks; run; data mable22.&stab._blocks; set &stab._blocks; run; proc sql; create table &stab._counties as select t1.State, t1.Stab, t1.County, t1.County3, t2.countySC label="County size category" as countySC, t1.Region, t1.Division, t1.CBSA20, t1.CBSAType20, t1.CSA20, t1.Metdiv20, t1.CBSA23, t1.CBSAType23, t1.CBSACentral23, t1.CSA23, t1.Metdiv23, t1.RUCC23, t1.LSAD, t1.FuncStat, t1.CtyPop20, t1.CtyHUs from mable22.&stab._counties t1 left join mable22.county_size_codes t2 on (t1.county = t2.county); quit; data mable22.&stab._counties; set &stab._counties; run; * Create the views. ; data mable22.&stab.v/view=mable22.&stab.v; merge mable22.&stab._blocks mable22.&stab._counties ; by county; run; %mend doit; %dostates(n=52);