/* Generate the mable22 views used in the geocorr 2020 web application. This program merges three datasets created in previously run setups. */ %include '/pub/sas/autoexec.sas'; options fmtsearch=(mable22 sasctlgs); options nosource nosource2 nomprint nomlogic nosymbolgen nonotes; libname mable22 '/pub/data/mable22_new'; libname source '/pub/data/mable22_new/source'; %macro doit(state, stab); * Split the block-level data. ; data mable22.&stab._blocks (sortedby=county tract block index=(county)); set source.blocks_master_final ; if state = &state; run; * Split the county-level data. ; data mable22.&stab._counties (sortedby=county index=(county)); set source.counties_master_final; if state = &state ; 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(n=72); ========================== end comment */ %dostates(n=72);