x cd /pub/data/popests/Tools; %let pgm=invoke_dosets; filename pgm "&pgm..sas"; /*--Invoke the %doset macro to create observations in the Datasets dataset for this directory. J. Blodgett, OSEDA, Jul., 2003 Rev. 5/05 to add xxcom04 datasets. 7/05 to add xxsc04 datasets. 8/06 to add casrh05 datasets. 9/06 to remove code related to casrh06 and later datasets which will now be processed in invoke_dosets_casrh setup. 3/08 to document county level com07 datasets. 8/08 for latest hu estimates sets. 12/08 for uscomnst08 set. (and 12/09 for the nst09 ests.) 3/10 for vintage 2009 com datasets. 3/15 to regenerate after a lot of archiving but before processing any vintage 2014 estimates. -- */ title "Job to Invoke doset Macro for Sets in popests, creating popests.datasets"; %include '/pub/sas/autoexec.sas'; options mprint symbolgen; %let libnameg=popests; libname popests '/pub/data/popests'; libname archives '/pub/data/popests/archives'; *-----Run this step ONLY ONCE------------------------------------------; *----If you need to rerun (start over) then delete the datasets dataset first. doset will not allow initialize mode if the datasets set already exists.---; %doset(mode=initialize, libname=popests,debug=1); *----------------------------------------------------------------------; ***<====only datasets names in this list get processed this run (if not commented out) =============; /* %let todo=uscom06 mocom06 mocom06t mocomregns06 uscomcbsas06; %let todo=ushuest2006 mohuest2006; %let todo=uscomnst07; %let todo=uscom07 mocom07 mocom07t mocomregns07 uscomcbsas07; %let todo=ussc07 mosc07; %let todo=ushuest2007 mohuest2007; %let todo=uscomnst08; %let todo=uscom08 mocom08 mocom08t mocomregns08 uscomcbsas08; %let todo=uscomnst09; %let todo=uscom09 mocom09 mocom09t mocomregns09 uscomcbsas09; %let todo=ustrends2; %let todo=_template_uscom uscom99 uscom06 mocom06; %let todo=_template_ussc _template_mosc ushuest2009 mohuest2009 ussc09 mosc09 ushuest2009 mohuest2009; %let todo=ushuest2018 mohuest2018; */ %let todo= _template_mocomt mocom09t mocom18t; /* NEW: %let todo= _template_mocom mocom09 mocom18; %let todo= mocomregns09 mocomregns16 mocomregns17 mocomregns18 monchsbridged19xx monchsbridged19xx_sumry monchsbridged20xx monchsbridged20xx_sumry monchsbridged201x monchsbridged201x_sumry; */ *--------------------------------Define all templates first------------------------------------------------------------*; /* =======================Begin comment================ /*<=====Special 1-time run to repair problems with sortprio fields on datasets dataset. ========================== ; data repaired; set popests.datasets; if sortprio='X' then sortprio=' '; *---following code was copied and pasted from doset macro---; if SortPrio=" " and not (memname=:'_template') then select(GeoUniv); when("Missouri","MISSOURI") SortPrio="1"; when("UnitedStates","United_States","United States") SortPrio="3"; when ("Illinois","Kansas","ILLINOIS","KANSAS") SortPrio="5"; otherwise SortPrio="7"; end; run; data popests.datasets; set repaired; run; ======================End comment================== */ %*let todo=nothing; *<====we are running this 3-11-15 just to regenerate the datasets dataset and Datasets.html after lots of editing and migrating of data.-------------------------------------------; %let gyear=2005; %let gyr=05; %doset(mode=,libname=popests,memname=_template_mocomt, geouniv=Missouri,units=variable, Years=%str(2000-~Gyear), CreatePgm=uscomYY.cnvt, Description=%nrbquote(This is the mocom~gyr data set transposed so that the rows are the data items and each column contains data for 1 geographic area. The names of the variables on this data set are of the form c29XXX, where XXX is a 3-digit FIPS county code.), keyvars=variable, keyidvars=Item_description, SubType=1com, SetGroup=mo, URLmeta=%str(), VarSet=, debug=0); %doset(libname=popests,memname=mocom&gyr.t,template=_template_mocomt) /* Comment out ============================================================= %doset(mode=,libname=popests, memname=_template_uscom, memlabel=%nrbquote(County estimates with components of change for 2000 thru ~Gyear, entire US), geouniv=UnitedStates, units=state county, Years=%str(2000-~Gyear), CreatePgm=uscomYY.cnvt, Keywords=Population estimates county components of change migration births deaths time series post 2000, Description=%nrbquote(Estimates of the total pop of counties, states and the US for July 1 of each year from 2000 to ~Gyear. along with annual birth, death, international and domestic migration estimates (the components of change).), keyvars=SumLev state county msacmsa cbsa, keyfmats=SumLev state county metro cbsa, DataSource=%str(U.S. Bureau of the Census: FSCPE. Estimates released in spring, ~yearp1), SortedBy=State County, UsageNotes=%nrbquote(