%include '/pub/sas/autoexec.sas'; options fmtsearch=(mable22 sasctlgs); options nosource nosource2 nomprint nomlogic nosymbolgen nonotes; libname mable22 '/pub/data/mable22'; %macro doit(state, stab); PROC SQL; CREATE TABLE &stab._blocks AS SELECT t1.GEOID, t1.State, t1.County, t1.CountySC, t1.County3, t1.CouSub20, t1.Place, t1.PlaceSC, t1.InPlace, t1.Tract, t1.BlockGroup, t1.Block, t1.NECTA, t1.NECTADiv, t1.CNECTA, t1.ConsCity, t1.SDElem20, t1.SDSec20, t1.SDUni20, t1.SDBest20, t1.SDBestType20, t2.pumace20 LABEL="PUMA (2022)" as PUMA22, t1.CD118, t1.SLDU22, t1.SLDL22, t1.CD116, t1.SLDU18, t1.SLDL18, t1.VTD20, t1.zcta, t1.HSA19, t1.HRR19, t1.MOlibrary, t1.intptlat, t1.intptlon, t1.LandSQMI, t1.AreaSQMI, t1.Pop20, t1.HUs20 FROM mable22.&stab._blocks t1 LEFT JOIN mable22.puma_combined_dedup t2 ON (t1.GEOID = t2.GEOID20); QUIT; data mable22.&stab._blocks; set &stab._blocks; run; * Create the views. ; data mable22.&stab.v/view=mable22.&stab.v; merge mable22.&stab._blocks mable22.&stab._counties ; by county; run; %mend doit; /* begin comment ==================================== %dostates(01 02 04 05 06 08 09 10 11 12 13 15 16 17); %dostates(18 19 20 21 22 23 24 25 26 27 28 29 30 31); %dostates(32 33 34 35 36 37 38 39 40 41 42); %dostates(44 45 46 47 48 49 50 53 54 55 56); %dostates(51 72); %dostates(10 11); ========================== end comment */ %dostates(n=52);