x cd /pub/data/irstaxes/Tools; %let pgm=invoke_dosets; filename pgm "&pgm..sas"; /*--Invoke the %doset macro to create observations in the Datasets dataset for this directory. *<==== We just do the original collection of sets in this setup. We do the "plus" datasets in invoke_dosets_plus.sas . ======================================================================================================================= J. Blodgett, OSEDA, Feb, 2014, Updated .. -- */ title "Job to Invoke doset Macro for Sets in irstaxes, creating irstaxes.datasets"; libname irstaxes '/pub/data/irstaxes'; %let libnameg=irstaxes; %let todo=; *-----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=irstaxes,debug=1); %let year=2011; %let yr=%substr(&year,3,2); *----------------------------------------------------------------------; *----------------------------Do all the "not plus" original data sets with IRS var names (4 per year)-----------------; *---We do zipsall, zipsno, cntyall, cntyno--*; %doset(mode=,libname=irstaxes, memname=uszipsallagi&yr, geouniv=US, units=%str(state ZIP), Years=&year, CreatePgm=cnvt_irstaxes, Keywords=&year IRS tax returns ZIP codes income, Description=%nrbquote(Summary of tax returns for &year at ZIP and State levels w AGI interval detail), keyvars=sumlev state agi_stub, keyfmats=%str(sumlev state | ), keyIdvars=%str( | | agi), DataSource=%str(Internal Revenue Service, SOI Division), SortedBy=State SumLev ZIPcode agi_stub, UsageNotes=%nrbquote(), SubType=zip2allagi, SetGroup=us, VarSet=, URLMeta=%str(https://mcdc.missouri.edu/pub/data/irstaxes/11zpdoc.doc), debug=0); %doset(mode=,libname=irstaxes, memname=uszipsnoagi&yr, geouniv=US, units=%str(state ZIP), Years=&year, CreatePgm=cnvt_irstaxes, Keywords=&year IRS tax returns ZIP codes income, Description=%nrbquote(Summary of tax returns for &year at ZIP and State levels - NO AGI interval detail), keyvars=sumlev state, keyfmats=%str(sumlev state ), DataSource=%str(Internal Revenue Service, SOI Division), SortedBy=State SumLev ZIPcode , UsageNotes=%nrbquote(), SubType=zip2noagi, SetGroup=us, VarSet=, URLMeta=%str(https://mcdc.missouri.edu/pub/data/irstaxes/11zpdoc.doc), debug=0); *==============================End of ZIP sets, begin county sets====================================================*; %doset(mode=,libname=irstaxes, memname=uscntysallagi&yr, geouniv=US, units=%str(state County), Years=&year, CreatePgm=cnvt_irstaxes2, Keywords=&year IRS tax returns County codes income, Description=%nrbquote(Summary of tax returns for &year at County and State levels w AGI interval detail), keyvars=sumlev state agi_stub, keyfmats=%str(sumlev state | ), keyIdvars=%str( | | agi), DataSource=%str(Internal Revenue Service, SOI Division), SortedBy=State SumLev County agi_stub, UsageNotes=%nrbquote(), SubType=cnty2allagi, SetGroup=us, VarSet=, URLMeta=%str(https://mcdc.missouri.edu/pub/data/irstaxes/11incydoc.doc), debug=0); %doset(mode=,libname=irstaxes, memname=uscntysnoagi&yr, geouniv=US, units=%str(state County), Years=&year, CreatePgm=cnvt_irstaxes2, Keywords=&year IRS tax returns County codes income, Description=%nrbquote(Summary of tax returns for &year at County and State levels - NO AGI interval detail), keyvars=sumlev state, keyfmats=%str(sumlev state ), DataSource=%str(Internal Revenue Service, SOI Division), SortedBy=State SumLev County , UsageNotes=%nrbquote(), SubType=cnty2noagi, SetGroup=us, VarSet=, URLMeta=%str(https://mcdc.missouri.edu/pub/data/irstaxes/11incydoc.doc), debug=0); proc sort data=irstaxes.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 irstaxes.datasets (Sorted by SortPrio)'; run ; proc datasets library=irstaxes nolist; modify datasets; index delete dataset memname; index create dataset=(libname memname) / unique; index create memname; quit; options NOmprint msglevel=i; %gendshtm(libname=irstaxes,debug=0,runprocc=0); *--------------------See invoke_dosets_plus for the setup to document the "plus" sets----;