x cd /pub/data/sf12010/Tools; %let pgm=invoke_dosetsus; filename pgm "&pgm..sas"; /*--Invoke the %doset macro to create observations for the new (12-11) us (national) sets in the Datasets dataset for this directory. This is a sequel to the invoke_dosets.sas setup. J. Blodgett, OSEDA, December, 2011, -- */ title "Job to Invoke doset Macro for us Sets in sf12010, adding to sf12010.datasets"; libname sf12010 '/pub/data/sf12010'; libname sf1 (sf12010); %let libnameg=sf12010; %**let todo=uscousubs usplaces; %*------------------------------Here we add entries for all the datasets that were created by setup cnvtsf1_national.sas . Some of these sets were created earlier as views that accessed all the states but it is faster to access these national data sets(by far) jgb, 12-7-11 --; /* ========================begin comment==================================== %doset(mode=,libname=sf12010, memname=_template_us, memlabel=, geouniv=%str(United States + PR), units=~gunits, sortprio=2, Years=2010, CreatePgm=cnvtsf1_national, Description=%nrbquote(Detailed P, H, PCT, and HCT tables for ~gunits), keyvars= sumlev state, keyfmats=sumlev state, DataSource=%str(U.S. Bureau of the Census), SortedBy=, SubType=aggall, SetGroup=us, VarSet=variables, URLMeta=%str(http://www.census.gov/prod/cen2010/doc/sf1pdf), debug=0); ==========================end comment====================================== */ %let gunits=Nation States Regions Divisions; %doset(mode=,libname=sf12010, memname=usregdivstates,template=_template_us, memlabel=, units=&gunits, Description=%nrbquote(Detailed P(CT) and H(CT) tables for the nation, states, census Regions and Divisions), keyvars= sumlev geocomp state, keyfmats=sumlev geocomp state, UsageNotes=%nrbquote(), SubType=phct, SetGroup=us, VarSet=variables, URLMeta=%str(http://www.census.gov/prod/cen2010/doc/sf1pdf), debug=0); %let gunits=American Indian & Alaska Native Areas; %doset(mode=,libname=sf12010, memname=usamindianetc,template=_template_us, memlabel=, units=&gunits, Description=%nrbquote(Detailed P(CT) and H(CT) tables for a myriad of tribal units), keyvars= sumlev state lsadc, keyfmats=sumlev state lsadc, UsageNotes=%nrbquote(), SubType=phct, SetGroup=us, VarSet=variables, URLMeta=%str(http://www.census.gov/prod/cen2010/doc/sf1pdf), debug=0); %let gunits=Congressional Districts (111th) and State Leg Districts (2010); %doset(mode=,libname=sf12010, memname=uscdslds,template=_template_us, memlabel=, units=&gunits, Description=%nrbquote(Detailed P(CT) and H(CT) tables for old (as of 1-1-10) Cong Districts and State Leg Dsts), keyvars= sumlev state, keyfmats=sumlev state, UsageNotes=%nrbquote(), SubType=phct, SetGroup=us, VarSet=variables, URLMeta=%str(http://www.census.gov/prod/cen2010/doc/sf1pdf), debug=0); %let gunits=Counties; %doset(mode=,libname=sf12010, memname=uscounties,template=_template_us, memlabel=, units=&gunits, Description=%nrbquote(Detailed P(CT) and H(CT) tables for US Counties and Equivalents), keyvars= sumlev state cbsa csa metrodiv lsadc, keyfmats=sumlev state cbsa csa metdiv lsadc, UsageNotes=%nrbquote(), SubType=phct, SetGroup=us, VarSet=variables, URLMeta=%str(http://www.census.gov/prod/cen2010/doc/sf1pdf), debug=0); %let gunits=County Subdivisions; %doset(mode=,libname=sf12010, memname=uscousubs,template=_template_us, memlabel=, units=&gunits, Description=%nrbquote(Detailed P(CT) and H(CT) tables for US County Subdivisions), keyvars= sumlev state county cbsa csa metrodiv lsadc, keyfmats=sumlev state county cbsa csa metdiv lsadc, UsageNotes=%nrbquote(), SubType=phct, SetGroup=us, VarSet=variables, URLMeta=%str(http://www.census.gov/prod/cen2010/doc/sf1pdf), debug=0); %let gunits=cbsas csas metrodivs etc; %doset(mode=,libname=sf12010, memname=usmetros,template=_template_us, memlabel=, units=&gunits, Description=%nrbquote(Detailed P(CT) and H(CT) tables for various metro area geographic entities as of 1-1-10), keyvars= sumlev geocomp state county cbsa csa metrodiv lsadc, keyfmats=sumlev geocomp state county cbsa csa metdiv lsadc, UsageNotes=%nrbquote(), SubType=phct, SetGroup=us, VarSet=variables, URLMeta=%str(http://www.census.gov/prod/cen2010/doc/sf1pdf), debug=0); %let gunits=places; %doset(mode=,libname=sf12010, memname=usplaces,template=_template_us, memlabel=, units=&gunits, keyvars= sumlev state county cbsa csa metrodiv lsadc , keyfmats=sumlev state county cbsa csa metdiv lsadc , Description=%nrbquote(Detailed P(CT) and H(CT) tables for places (cities) and place/county areas as defined on 1-1-10.), UsageNotes=%nrbquote(), SubType=phct, SetGroup=us, VarSet=variables, URLMeta=%str(http://www.census.gov/prod/cen2010/doc/sf1pdf), debug=0); *** options mlogic mprint; %let gunits=ZCTAs; %doset(mode=,libname=sf12010, memname=uszips,template=_template_us, memlabel=, units=&gunits, Description=%nrbquote(Detailed P(CT) and H(CT) tables for 5-digit ZIP Census Tabulation Areas (ZCTAs)), keyvars= sumlev state county , keyfmats=sumlev state county , UsageNotes=%nrbquote(), SubType=phct, SetGroup=us, VarSet=variables, URLMeta=%str(http://www.census.gov/prod/cen2010/doc/sf1pdf), debug=0); %let gunits=all sf12010 national levels; %doset(mode=,libname=sf12010, memname=usphctr,template=_template_us, memlabel=, units=&gunits, Description=%nrbquote(Detailed pct<r> tables (repeated for pop subgroups) for all geographies in US), keyvars= sumlev geocomp state county , keyfmats=sumlev geocomp state county , UsageNotes=%nrbquote(), SubType=phct, SetGroup=us, VarSet=variablesr, URLMeta=%str(http://www.census.gov/prod/cen2010/doc/sf1pdf), debug=0); proc sort data=sf12010.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 sf12010.datasets (Sorted by SortPrio)'; run cancel; proc datasets library=sf12010 nolist; modify datasets; index delete dataset memname; index create dataset=(libname memname) / unique; index create memname; quit; options NOmprint msglevel=i; %gendshtm(libname=sf12010,debug=0,runprocc=0);