x cd /pub/data/dhc2020x/Tools; %let pgm=invoke_dosets_cdsldspumas; filename pgm "&pgm..sas"; /* Invoke the %doset macro to create observations in the Datasets dataset for this directory. */ title "Job to invoke doset macro for XXcdsldspumas sets in dhc2020x, adding to dhc2020x.datasets"; options notes source nosource2 nosymbolgen mprint spool; %include '/pub/sas/autoexec.sas'; libname dhc2020x '/pub/data/dhc2020x'; %let libnameg = dhc2020x; %let todo=; %let todolist=; /* Run this step ONLY ONCE. If you need to rerun (start over), delete the datasets dataset first. doset will not allow initialize mode if the datasets set already exists. */ %*doset(mode=initialize, libname=dhc2020x, debug=1); %macro doit(state, stab); %doset( mode=, libname=dhc2020x, memname=&stab.cdsldspumas, memlabel=%str(&statenm DHC 2020 extracts for 116th CDs, 2018-vintage SLDs, and 2022 PUMAs), geouniv=&statenm, units=cd116 sldl18 sldu18 puma22, sortprio=3, Years=2020, CreatePgm=create_cdsldspumas, Description=%nrbquote(Standard extract for 116th CDs, 2018-vintage SLDs, and 2022 PUMAs in &statenm), keyvars=sumlev state, keyfmats=sumlev state, keyquals=, DataSource=%str(U.S. Bureau of the Census/MCDC), SortedBy=state, UsageNotes=%nrbquote( ), SubType=selectedinv, SetGroup=&stab, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/pub/data/dhc2020x/Variables.pdf), debug=0 ); %mend doit; %dostates(n=52,names=1) ; /* post processing */ proc sort data=dhc2020x.datasets out=bysortprio; by sortprio; run; proc print data=bysortprio; by libname notsorted libpath ; id memname; var SortPrio SetGroup SubType VarSet URLmeta GeoUniv years ; title2 'Listing of selected fields from dhc2020x.datasets (sorted by SortPrio)'; run ; proc datasets library=dhc2020x nolist; modify datasets; index delete dataset memname; index create dataset=(libname memname) / unique; index create memname; quit; options NOmprint msglevel=i; %gendshtm(libname=dhc2020x, debug=0, runprocc=0);