x cd /pub/data/acs2007/Tools; %let pgm=invoke_dosets_basetbls; filename pgm "&pgm..sas"; /*--Invoke the %doset macro to create observations in the Datasets dataset for the acs2007/basetbls directory. J. Blodgett, OSEDA, Nov., 2008 Rev. -- */ title "Job to Invoke doset Macro for Sets in acs2007/basetbls"; libname acs2007 '/pub/data/acs2007'; libname basetbls '/pub/data/acs2007/basetbls'; %let libnameg=basetbls; %let gyear=2007; *--gp is the blobal period parameter. Value can be 1 or 3--; *-----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=basetbls,debug=1); *----------------------------------------------------------------------; options mprint; %doset(memname=_template_ustabs, filetype=acs2007, geouniv=United States, Description=%nrbquote(Detailed (aka "base") tables for selected topics from 2007 ACS for geographic areas of 65,000+ for US), units=%nrbquote(Nation State County PUMA etc), Year=&gyear, CreatePgm=create_basetables, 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(), URLMeta=%str(https://mcdc.missouri.edu/pub/data/acs2007/basetbls/Varlabs/00_07labels.txt), debug=1) ; %doset(libname=basetbls,memname=ustabs08,template=_template_ustabs,filetype=acs2007, subtype=base08, memlabel=%str(US single-year ests for tables in 08 topic series), UsageNotes=%nrbquote(+08: Journey to Work, Worker Characteristics.
  • On many of these tables the geography refers to the place of work rather than the residence. Many geographic areas have no such data reported so you will see a lot of missing data on this set. ), URLMeta=%str(https://mcdc.missouri.edu/pub/data/acs2007/basetbls/Varlabs/08labels.txt), debug=0) ; %doset(libname=basetbls,memname=ustabs09_16,template=_template_ustabs,filetype=acs2007, subtype=base09, memlabel=%str(US single-year ests for tables in 09 thru 16 topic series), UsageNotes=%nrbquote(+09: Children, Relationship / 10: Grandparents, Age of HH members / 11: Households, Families / 12 Marital Status / 13: Fertility / 14: School Enrollment / 15: Educational Attainment / 16: Language Spoken at Home ), URLMeta=%str(https://mcdc.missouri.edu/pub/data/acs2007/basetbls/Varlabs/09_16labels.txt), debug=0) ; %doset(libname=basetbls,memname=ustabs17_20,template=_template_ustabs,filetype=acs2007, subtype=base17, memlabel=%str(US single-year ests for tables in 17 thru 20 topic series), UsageNotes=%nrbquote(+17: Poverty / 18: Disability / 19: Income (Household, Family) / Earnings ), URLMeta=%str(https://mcdc.missouri.edu/pub/data/acs2007/basetbls/Varlabs/17_20labels.txt), debug=0) ; %doset(libname=basetbls,memname=ustabs21_24,template=_template_ustabs,filetype=acs2007, subtype=base21, memlabel=%str(US single-year ests for tables in 21 thru 24 topic series), UsageNotes=%nrbquote(+21: Veteran Status / 22: Transfer Programs, Food Stamps / 23: Employment Status / 24: Industry, Occupation, Class of Worker ), URLMeta=%str(https://mcdc.missouri.edu/pub/data/acs2007/basetbls/Varlabs/21_24labels.txt), debug=0) ; %doset(libname=basetbls,memname=ustabs25_26,template=_template_ustabs,filetype=acs2007, subtype=base25, memlabel=%str(US single-year ests for tables in 25 and 26 topic series), UsageNotes=%nrbquote(+25: Housing Characteristics / 26: Group Quarters (just 1 data cell) ), URLMeta=%str(https://mcdc.missouri.edu/pub/data/acs2007/basetbls/Varlabs/25_26labels.txt), debug=0) ; *----------------------NOW do the 3yr datasets-----------------------------------------------------; %let gyear=%str(2005-2007); %doset(memname=_template_ustabs3yr, filetype=acs2007, geouniv=United States, Description=%nrbquote(Detailed (aka "base") tables for selected topics, ~gyear ACS period estimates for geographic areas of 20,000+ for US), units=%nrbquote(Nation State County PUMA etc), Year=~gyear, CreatePgm=create_basetables, 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(), URLMeta=%str(https://mcdc.missouri.edu/pub/data/acs2007/basetbls/Varlabs/00_07labels.txt), debug=1) ; %doset(libname=basetbls,memname=ustabs083yr,template=_template_ustabs3yr,filetype=acs2007, subtype=base083yr, memlabel=%str(US &gyear period ests for tables in 08 topic series), UsageNotes=%nrbquote(+08: Journey to Work, Worker Characteristics.
  • On many of these tables the geography refers to the place of work rather than the residence. Many geographic areas have no such data reported so you will see a lot of missing data on this set. ), URLMeta=%str(https://mcdc.missouri.edu/pub/data/acs2007/basetbls/Varlabs/08labels.txt), debug=0) ; %doset(libname=basetbls,memname=ustabs09_163yr,template=_template_ustabs3yr,filetype=acs2007, subtype=base093yr, memlabel=%str(US &gyear period ests for tables in 09 thru 16 topic series), UsageNotes=%nrbquote(+09: Children, Relationship / 10: Grandparents, Age of HH members / 11: Households, Families / 12 Marital Status / 13: Fertility / 14: School Enrollment / 15: Educational Attainment / 16: Language Spoken at Home ), URLMeta=%str(https://mcdc.missouri.edu/pub/data/acs2007/basetbls/Varlabs/09_16labels.txt), debug=0) ; %doset(libname=basetbls,memname=ustabs17_203yr,template=_template_ustabs3yr,filetype=acs2007, subtype=base173yr, memlabel=%str(US &gyear period ests for tables in 17 thru 20 topic series), UsageNotes=%nrbquote(+17: Poverty / 18: Disability / 19: Income (Household, Family) / Earnings ), URLMeta=%str(https://mcdc.missouri.edu/pub/data/acs2007/basetbls/Varlabs/17_20labels.txt), debug=0) ; %doset(libname=basetbls,memname=ustabs21_243yr,template=_template_ustabs3yr,filetype=acs2007, subtype=base213yr, memlabel=%str(US &gyear period ests for tables in 21 thru 24 topic series), UsageNotes=%nrbquote(+21: Veteran Status / 22: Transfer Programs, Food Stamps / 23: Employment Status / 24: Industry, Occupation, Class of Worker ), URLMeta=%str(https://mcdc.missouri.edu/pub/data/acs2007/basetbls/Varlabs/21_24labels.txt), debug=0) ; %doset(libname=basetbls,memname=ustabs25_263yr,template=_template_ustabs3yr,filetype=acs2007, subtype=base253yr, memlabel=%str(US &gyear period ests for tables in 25 and 26 topic series), UsageNotes=%nrbquote(+25: Housing Characteristics / 26: Group Quarters (just 1 data cell) ), URLMeta=%str(https://mcdc.missouri.edu/pub/data/acs2007/basetbls/Varlabs/25_26labels.txt), debug=0) ; proc sort data=basetbls.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 basetbls.datasets (Sorted by SortPrio)'; run ; proc datasets library=basetbls nolist; modify datasets; index delete dataset memname; index create dataset=(libname memname) / unique; index create memname; quit; options mprint msglevel=i; %gendshtm(libname=basetbls,debug=1,runprocc=1);