x cd /pub/data/acs2008/Tools; %let pgm=invoke_dosets_profiles; filename pgm "&pgm..sas"; /*--Invoke the %doset macro to create observations in the Datasets dataset for the acs2008 directory which contains key profiles data sets as well as geography sets. Does not include basetbls data which is handled separately. J. Blodgett, OSEDA, Sept, 2009 -- */ title "Job to Invoke doset Macro for Sets in acs2008"; libname acs2008 '/pub/data/acs2008'; libname user '/SAS_temp/user'; %let libnameg=acs2008; %let gyear=2008; *-----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=acs2008,debug=1); *----------------------------------------------------------------------; options mprint; %doset(memname=_template_mcdcpros1, filetype=acs2008, geouniv=United States, memlabel=%str(MCDC profile extract for all US areas with 65,000+ population based on ~gyear surveys), Description=%nrbquote(MCDC-defined profile extracts for Areas of 65,000+ population as used in acsprofiles web app), units=%nrbquote(Nation State County PUMA etc), Year=&gyear, CreatePgm=upload_edit_usmcdcprofiles, keyvars=sumlev geocomp state county cbsa ua placefp metrodiv csa necta, keyfmats=sumlev geocomp state county cbsa uauc2k fplace metrodiv csa necta, keyquals= %str( | | | | | | state | | |), DataSource=%str(U.S. Bureau of the Census), SortedBy=State LogRecno, UsageNotes=%nrbquote( ), SubType=1yrpro, SetGroup=us, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/data/acs2008/Variables.pdf) ); %doset(libname=acs2008,memname=usmcdcprofiles,template=_template_mcdcpros1, UsageNotes=%nrbquote(+
  • Data set may be rerun to change some names of poverty variables and add CBSA codes to county summaries ), debug=0) ; %let gyear=%str(2006-2008); %doset(memname=_template_mcdcpros3, filetype=acs2008, geouniv=United States, memlabel=%str(MCDC profile extract for all US areas with 20,000+ population based on ~gyear surveys), Description=%nrbquote(MCDC-defined profile extracts for Areas of 20,000+ population as used in acsprofiles web app), units=%nrbquote(Nation State County PUMA etc), Year=&gyear, CreatePgm=cnvt_census_to_mcdc, keyvars=sumlev geocomp state county cbsa ua placefp metrodiv csa necta, keyfmats=sumlev geocomp state county cbsa uauc2k fplace metrodiv csa necta, keyquals= %str( | | | | | | state | | |), DataSource=%str(U.S. Bureau of the Census), SortedBy=State LogRecno, UsageNotes=%nrbquote( ), SubType=3yrpro, SetGroup=us, VarSet=variables, URLMeta=%str(https://mcdc.missouri.edu/data/acs2008/Variables.pdf) ); %doset(libname=acs2008,memname=usmcdcprofiles3yr,template=_template_mcdcpros3, UsageNotes=%nrbquote(+
  • Data set may be rerun to change some names of poverty variables and add CBSA codes to county summaries ), debug=0) ; proc sort data=acs2008.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 acs2008.datasets (Sorted by SortPrio)'; run ; proc datasets library=acs2008 nolist; modify datasets; index delete dataset memname; index create dataset=(libname memname) / unique; index create memname; quit; options mprint msglevel=i; %gendshtm(libname=acs2008,debug=1,runprocc=1);