x cd /pub/data/sf12000x/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, Sep. 2004 -- */ title "Job to Invoke doset Macro for Sets in sf12000x, creating sf12000x.datasets"; %let libnameG=sf12000x; libname sf12000x '/pub/data/sf12000x'; /*<=========================Comment out===================================== *-----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=sf12000x,debug=1); %include '/pub/sas/macros/metafixj.sas'/source2; options mprint; %metafix(filetype=sf12000x,newdata=1); ===========================End commented out================================ */ *----------------------------------------------------------------------; %doset(libname=sf12000x,memname=_template_mo,geouniv=Missouri,Year=2000,keyvars=sumlev county, keyfmats=sumlev county DataSource=%nrbquote(2000 Decennial Census: Summary File 1), SetGroup=mo, CreatePgm=cnvt_mo, URLMeta=%str(https://mcdc.missouri.edu/pub/data/sf12000x/Hypercon.html) ) %doset( memname = ccns , libname = sf12000x, template=_template_mo, units=Caring Communities neighborhoods, keyvars=ccn,keyidvars=areaname, sortprio=8, Description = %nrbquote(Data for Missouri Caring Communities neighborhoods areas as defined summer of 2001. No data (yet) from PCT tables and no 1990 pop count. ), CreatePgm=cnvt_sf12000x_ccns ); %doset( memname = ccs , libname = sf12000x, template=_template_mo, units=Caring Communities Partnerships, keyvars=cc,keyidvars=areaname, sortprio=8, Description = %nrbquote(Data for Missouri Caring Community partnerships areas. These are the summaries for the entire area, while the dataset ccns has data for the neighborhoods that comprise the partnerships. ) ,CreatePgm=cnvt_sf12000x_ccns ); %doset( memname = de , libname = sf12000x, universe=Delaware, units=all sf1, Description = %nrbquote(Data for the state of Delaware. We did not bother separating into inventory and hierarchal - all levels are in the one data set. ) ); %doset( memname = moblks , libname = sf12000x, template=_template_mo, units=block, keyvars=sumlev county placefp, keyfmats=sumlev county fplace, keyquals=| | state, Description = %nrbquote(Missouri block level data set. Data for all blocks, even those with zero pop and housing units. ) ); %doset( memname = mocd108 , libname = sf12000x, template=_template_mo, units=cd108, CreatePgm=cnvt_sf12000x_molegdists02, Description = %nrbquote(Summaries for Missouri 108th Congressional Districts. ) ); %doset( memname = moh , libname = sf12000x, template=_template_mo, units=sf1 hierarchal, keyvars=sumlev county placefp cousubfp, keyfmats=sumlev county fplace momcd, keyquals= | | state, Description = %nrbquote(Missouri data for hierarchal summary levels (070, 080, 091 and 158). See Readme.html for details. ) ); %doset( memname = moi , libname = sf12000x, template=_template_mo, units=sf1 inventory, keyvars=sumlev county placefp cousubfp, keyfmats=sumlev county fplace momcd, keyquals= | | state, Description = %nrbquote( Data for Mo inventory geography. The levels and the value of sumlev that go with them are: state (040), county (050), township (060), tract (140), block group (150), place within county (155), place within state (160), 5-digit ZIP within county (881), 5-d igit ZIP within state (871), 106th Congressional District (500), MSA (390). And a few others. This has all summaries on SF1 except 070, 080 and 091 which are on the moh data set, and 101 which is on the moblks data set. 1990 pop and change available i f the geographic area existed in 1990. ) ); %doset( memname = moschlcos , libname = sf12000x, template=_template_mo, units=School District within county, CreatePgm=cnvt_sf12000x_moschls, Description = %nrbquote( These are summaries for Missouri School districts within counties. I.e. it has a separate summary for the portion of each district within a county. Many districts are contained in only one county, in which case there is only one summary for them. Note that the moschls dataset has summaries for **complete** districts (but has no county codes.) These were custom aggregated by the MCDC. ), keyvars=sumlev county desedist ncescode, keyfmats=sumlev county desedst moschl) ; %doset( memname = moschls , libname = sf12000x, template=_template_mo, units=School Districts, CreatePgm=cnvt_sf12000x_moschls, Description = %nrbquote( This is data for Missouri school districts, which the MCDC custom-aggregated from block and tract level data using a geographic equivalency file. It has summaries for both Unified and Elementary districts. The DESE district code is included as variable desecode. ), keyvars=sumlev desedist ncescode, keyfmats=sumlev | |, keyidvars=| areaname areaname ); %doset( memname = mostcnty , libname = sf12000x, template=_template_mo, units=State County, Description = %nrbquote(Missouri state and county totals (view). ) ); %doset( memname = mozipcos , libname = sf12000x, CreatePgm=cnvt_sf12000x_mozips, keyvars=sumlev county,keyfmats=sumlev county, universe=Missouri, units=%str(ZCTA/County), Description = %nrbquote(Missouri ZIP codes (ZCTAs) within county. Sorted by ZIP (ZCTA5) and county. Seee also mozips.sas7bdat. ) ); %doset( memname = mozips , libname = sf12000x, template=_template_mo, units=ZCTA, CreatePgm=cnvt_sf12000x_mozips, keyvars=sumlev,keyfmats=sumlev, Description = %nrbquote(Missouri complete ZIP code (ZCTA - ZIP Census Tabulation Area) summaries. See also mozipcos.sas7bdat that has summaries for these ZIP areas broken down within county. ) ); %doset( memname = us , libname = sf12000x, universe=UnitedStates, units=state county place msa, keyvars=sumlev state county place msacmsa, keyfmats=sumlev state county fplace metro, keyquals= | | | state, CreatePgm=cnvt_us, Description = %nrbquote( Data from the SF1 Advance National File. This is a file with United States coverage, that has summaries for the U.S. (totals), regions, divisions, states, counties, places (cities), county subdivisions (MCD's), metro areas and ZIP codes ("ZCTA"s). The 19 90 population, along with derived change and pctchange variables, were obtained from various sources including 1990 STF1, 1990 GICS sets, and (in the case of ZIP codes) 1990 STF3 datasets. ) ); proc sort data=sf12000x.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 sf12000x.datasets (Sorted by SortPrio)'; run ; proc datasets library=sf12000x nolist; modify datasets; index delete dataset memname; index create dataset=(libname memname) / unique; index create memname; quit; options mprint msglevel=i; %gendshtm(libname=sf12000x,debug=1,runprocc=1);