x cd /pub/data/acs2006/Tools; %let pgm=invoke_dosets_summary; filename pgm "&pgm..sas"; /*--Invoke the %doset macro to create observations in the Datasets dataset for the acs2006/summary directory. J. Blodgett, OSEDA, Nov., 2007 Rev. 11/12/2007 11:47:05 AM -- */ title "Job to Invoke doset Macro for Sets in acs2006/summary, creating summary.datasets"; libname acs2006 '/pub/data/acs2006'; libname summary '/pub/data/acs2006/summary'; %let libnameg=summary; %let gyear=2006; *-----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.---; %*oset(mode=initialize, libname=summary,debug=1); *----------------------------------------------------------------------; options mprint; *--Create the templates for the 4 datasets: 2 decades (20xx and 19xx) and 2 types (orignal and _sumry)---; %doset(memname=_template_ustabs, filetype=acs2006, geouniv=United States, units=%nrbquote(Nation State County PUMA etc), Year=&gyear, CreatePgm=cnvt_summary_files, 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(), debug=1) ; %doset(libname=summary,memname=ustabs08,template=_template_ustabs,filetype=acs2006, Description=%nrbquote(Detailed (aka "base") tables for selected topics from 2006 ACS for geographic areas of 65,000+ for US), UsageNotes=%nrbquote(+01: 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. ), debug=0) ; %doset(libname=summary,memname=ustabs09_16,template=_template_ustabs,filetype=acs2006, Description=%nrbquote(Detailed (aka "base") tables for selected topics from 2006 ACS for geographic areas of 65,000+ for US), 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 ), debug=0) ; %doset(libname=summary,memname=ustabs17_20,template=_template_ustabs,filetype=acs2006, Description=%nrbquote(Detailed (aka "base") tables for selected topics from 2006 ACS for geographic areas of 65,000+ for US), UsageNotes=%nrbquote(+17: Poverty / 18: Disability / 19: Income (Household, Family) / Earnings ), debug=0) ; %doset(libname=summary,memname=ustabs21_24,template=_template_ustabs,filetype=acs2006, Description=%nrbquote(Detailed (aka "base") tables for selected topics from 2006 ACS for geographic areas of 65,000+ for US), UsageNotes=%nrbquote(+21: Veteran Status / 22: Transfer Programs, Food Stamps / 23: Employment Status / 24: Industry, Occupation, Class of Worker ), debug=0) ; %doset(libname=summary,memname=ustabs25_26,template=_template_ustabs,filetype=acs2006, Description=%nrbquote(Detailed (aka "base") tables for selected topics from 2006 ACS for geographic areas of 65,000+ for US), UsageNotes=%nrbquote(+25: Housing Characteristics / 26: Group Quarters (just 1 data cell) ), debug=0) ; proc sort data=summary.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 summary.datasets (Sorted by SortPrio)'; run ; proc datasets library=summary nolist; modify datasets; index delete dataset memname; index create dataset=(libname memname) / unique; index create memname; quit; options mprint msglevel=i; %gendshtm(libname=summary,debug=1,runprocc=1);