*----Code "cut" from invoke_dosets after restructuring mo, il ks data, going 
   back to simplified moi, moh datasets.  jgb, 2/2005. ----;

%let state=29; %let stab=mo; %let statenm=Missouri;
 %doset(libname=stf903,memname=moplaces,template=_template_places,createpgm=)
%let state=17; %let stab=il; %let statenm=Illinois;
 %doset(libname=stf903,memname=ilplaces,template=_template_places,createpgm=)
%let state=20; %let stab=ks; %let statenm=Kansas;
 %doset(libname=stf903,memname=ksplaces,template=_template_places,createpgm=)


 %doset(mode=,libname=stf903,
   memname=_template_ssbgxxxx, template=_template_generic,
   memlabel=%nrbquote(Block Group Summaries for ~msaname MSA in ~statenm),
   geouniv=%str(~msaname MSA, ~stab),
   units=Block Group,
   Year=1990,
   CreatePgm=,
   Keywords=stf3 stf903 summary tape file 3 1990 census sample data state tract block groups,
   Description=%nrbquote(Block group (level 150) summaries for ~msaname MSA within ~statenm.),
   keyvars=slvl  state county,
   keyfmats=slvl state county ,
   DataSource=%str(1990 Census, Summary Tape File 3),
   SortedBy=county tract bg,
   SubType=,
   SetGroup=~statenm,
  UsageNotes=%nrbquote(<ul><li>These data can be accessed via the <a href="http://factfinder.census.gov">American FactFinder</a>
 application at the Census Bureau web site (choose <i>Data Sets</i> and then <i>1990 Summary Tape File 3</i> from 1st 2 pages.)
  <li>Even if its a custom aggregation by the MCDC that is not available from AFF, you can still use the site to access
the metadata.  It is by far the easiest/fastest way to find out what tables are available for what keywords.  Choose the
Detailed Tables options and then use the "by keyword" tab on the Select Tables page.  Enter 1 or more keywords (e.g.
"<i>poverty age</i>") to get a list of tables related to those categories.
  <li>For table cell variables we use the standard MCDC variable naming convention:
 the table code, the letter <i>i</i> (for "item") and the
 the sequential cell #.  For example, the 9 data cells of table P121 are named P121i1, P121i2, ..., P121i9.
  </ul>),
   URLMeta=%str(https://mcdc.missouri.edu/pub/data/stf903/Docs/index.html),
   debug=0) ;

 %let state=20; %let stab=ks; %let statenm=Kansas;
 %let msaname=Kansas City;
 %doset(libname=stf903,memname=ksbg3760,template=_template_ssbgxxxx,createpgm=ksbgs,sortprio=6)

 %let state=29; %let stab=mo?
; %let statenm=Missouri;
 %let msaname=Kansas City;
 %doset(libname=stf903,memname=mobg3760,template=_template_ssbgxxxx,sortprio=2)
 %let msaname=Columbia;
 %doset(libname=stf903,memname=mobg1740,template=_template_ssbgxxxx,sortprio=2)
 %let msaname=Joplin;
 %doset(libname=stf903,memname=mobg3710,template=_template_ssbgxxxx,sortprio=2)
 %let msaname=St. Joseph;
 %doset(libname=stf903,memname=mobg7000,template=_template_ssbgxxxx,sortprio=2)
 %let msaname=St. Louis;
 %doset(libname=stf903,memname=mobg7040,template=_template_ssbgxxxx,sortprio=2)
 %let msaname=Springfield;
 %doset(libname=stf903,memname=mobg7920,template=_template_ssbgxxxx,sortprio=2)

 %let state=17; %let stab=il; %let statenm=Illinois;
 %let msaname=St. Louis;
 %doset(libname=stf903,memname=ilbg7040,template=_template_ssbgxxxx,sortprio=6)

%doset(mode=,libname=stf903,template=_template_generic,
    memname=ksbgs,
    memlabel=%nrbquote(Complete Tables for Kansas Block Groups),
    geouniv=Kansas,
    units=Block Groups,
    Year=1990,
    CreatePgm=,
    Keywords=stf3 stf903 summary tape file 3 1990 census sample data state tract block group,
    Description=%nrbquote(),
   keyvars=slvl  county,
   keyfmats=slvl county,
   DataSource=%str(1990 Census, Summary Tape File 3),
   SortedBy=,
   SubType=,
   SetGroup=Kansas,
   Sortprio=6,
   URLMeta=%str(https://mcdc.missouri.edu/data/stf903/Docs),
   debug=0)


%doset(mode=,libname=stf903,
    memname=_template_other,  template=_template_generic,
    memlabel=%nrbquote(Other Level Summaries for ~statenm),
    geouniv=~statenm,
    units=Urban Areas,
    Year=1990,
    CreatePgm=,
    Keywords=stf3 stf903 summary tape file 3 1990 census sample data urban place,
    Description=%nrbquote(STF3 Table Summaries for Miscellaneous Summary Levels in ~statenm),
   keyvars=slvl  state county  msacmsa placefp,
   keyfmats=slvl state county  metro fplace,
   keyquals=|   |  |   |   state,
   keyidvars=,
   DataSource=%str(1990 Census, Summary Tape File 3),
   SortedBy=,
   UsageNotes=%nrbquote(-<ul>
   Summary levels included are: 155, 329, 340, 420, 430, 440, 450, 460.  See
   <a href='/data/sf32000/Techdoc/Ch4_Sumlevs.pdf'>summary level sequence chart</a> for definitions.
    </ul>),
   SubType=,
   SetGroup=,
   URLMeta=%str(https://mcdc.missouri.edu/data/stf903/Docs),
   debug=0)
%let state=29; %let stab=mo; %let statenm=Missouri;
 %doset(libname=stf903,memname=moother,template=_template_other,createpgm=)
 
 %let state=17; %let stab=il; %let statenm=Illinois;
 %doset(libname=stf903,memname=ilother,template=_template_other,createpgm=)

%doset(mode=,libname=stf903,
    memname=_template_places,   template=_template_generic,
    memlabel=%nrbquote(Place(City) Level Summaries for ~statenm),
    geouniv=~statenm,
    units=State County Place,
    Year=1990,
    CreatePgm=,
    Keywords=stf3 stf903 summary tape file 3 1990 census sample data place,
    Description=%nrbquote(Complete STF3 Table Summaries for Summary Level 160 (complete place) for ~statenm),
   keyvars=slvl  state placefp,
   keyfmats=slvl state fplace,
   DataSource=%str(1990 Census, Summary Tape File 3),
   SortedBy=,
   UsageNotes=%nrbquote(-<ul>
  <li>If you need place-within-county summaries then you need summary level 155, found on either the &stab.i or &stab.other dataset.
  <li>Since places do not in general nest within counties, the county codes are not filled in on this dataset.
  <li>Both FIPS and census place codes were used in 1990.  See the keyvars entry for the Place variable to see a
report showing census to FIPS correspondence.
  </ul>),
   SubType=,
   SetGroup=,
   URLMeta=%str(https://mcdc.missouri.edu/data/stf903/Docs),
   debug=0)
   
*--we edited the metros template and it does not appear here---;
%let state=00; %let stab=us; %let statenm=United States;
 %doset(libname=stf903,memname=usmetros,template=_template_metros,sortprio=3)
%let state=29; %let stab=mo; %let statenm=Missouri;
 %doset(libname=stf903,memname=mometros,template=_template_metros,createpgm=)
%let state=17; %let stab=il; %let statenm=Illinois;
 %doset(libname=stf903,memname=ilmetros,template=_template_metros,createpgm=)
%let state=20; %let stab=ks; %let statenm=Kansas;
 %doset(libname=stf903,memname=ksmetros,template=_template_metros,createpgm=)
 
%doset(mode=,libname=stf903,
    memname=_template_mcds, template=_template_generic,
    memlabel=%nrbquote(County Subdivision Level Summaries (060) for ~statenm),
    geouniv=~statenm,
    units=County Subdivisions,
    Year=1990,
    CreatePgm=%str(),
    Keywords=stf3 stf903 summary tape file 3 1990 census sample data townships subdivisions,
    Description=%nrbquote(Complete STF3 Table Summaries for County Subdivisions for ~statenm),
   keyvars=slvl  state county msacmsa,
   keyfmats=slvl state county metro,
   DataSource=%str(1990 Census, Summary Tape File 3),
   SortedBy=State fipco,
   UsageNotes=%nrbquote(<ul>
    </ul>),
   SubType=,
   SetGroup=~statenm,
   URLMeta=%str(https://mcdc.missouri.edu/data/stf903/Docs),
   debug=0)
%let state=29; %let stab=mo; %let statenm=Missouri;
 %doset(libname=stf903,memname=momcds,template=_template_mcds,sortprio=2)
%let state=00; %let stab=us; %let statenm=United States;
 %doset(libname=stf903,memname=usmcds,template=_template_mcds,sortprio=4)
%let state=17; %let stab=il; %let statenm=Illinois;
 %doset(libname=stf903,memname=ilmcds,template=_template_mcds,sortprio=6)
%let state=20; %let stab=ks; %let statenm=Kansas;
 %doset(libname=stf903,memname=ksmcds,template=_template_mcds,sortprio=6)
 
 %doset(mode=,libname=stf903,template=_template_generic,
    memname=mosl080,
    memlabel=%nrbquote(Complete Tables for Missouri Split Census Tracts/BNAs),
    geouniv=Missouri,
    units=%str(SumLev 080),
    Year=1990,
    CreatePgm=,
    Keywords=stf3 stf903 summary tape file 3 1990 census sample data state tract block numbering areas,
    Description=%nrbquote(Hierarchal summaries for Census Tracts within township and place),
   keyvars=slvl  county,
   keyfmats=slvl county,
   DataSource=%str(1990 Census, Summary Tape File 3),
   SortedBy=county,
   SubType=,
   SetGroup=Missouri,
   Sortprio=2,
   URLMeta=%str(https://mcdc.missouri.edu/data/stf903/Docs),
   debug=0)
%let state=29; %let stab=mo; %let statenm=Missouri;

 %doset(mode=,libname=stf903,template=_template_generic,
    memname=mosl070,
    memlabel=%nrbquote(Complete Tables for Missouri Places Within Townships),
    geouniv=Missouri,
    units=Place,
    Year=1990,
    CreatePgm=,
    Keywords=stf3 stf903 summary tape file 3 1990 census sample data state county subdivisions place,
    Description=%nrbquote(Missouri Summaries for Summary Level 070, Places Within Townships),
   keyvars=slvl  county  placefp,
   keyfmats=slvl county  fplace,
   SortedBy=county,
   SubType=,
   SetGroup=Missouri,
   Sortprio=2,
   URLMeta=%str(https://mcdc.missouri.edu/data/stf903/Docs),
   debug=0)
   
%doset(mode=,libname=stf903,
   memname=ilhstl,template=_template_generic,
   memlabel=%nrbquote(Hierarchal Summary Levels for Illinois portion of the St. Louis MSA),
   geouniv=%str(St. Louis MSA, IL),
   units=hierarchal levels,
   Year=1990,
   CreatePgm=,
   Keywords=stf3 stf903 summary tape file 3 1990 census sample data state tract hierarchal blockgroups,
   Description=%nrbquote(Hierarchal data summary levels (070 080 090) for St. Louis metro area, Illinois pt),
   keyvars=slvl county ,
   keyfmats=slvl  county ,
   SortedBy=county,
   SubType=,
   SetGroup=stlil,
   Sortprio=6,
   URLMeta=%str(https://mcdc.missouri.edu/data/stf903/Docs),
   debug=0)

%doset(mode=,libname=stf903,template=_template_generic,
   memname=ilhnotsl,
   memlabel=%nrbquote(Hierarchal Summaries for Illinois outside St. Louis MSA),
   geouniv=Illinois special,
   units=Block Group,
   Year=1990,
   CreatePgm=,
   Keywords=stf3 stf903 summary tape file 3 1990 census sample data state tract blockgroups,
   Description=%nrbquote(Hierarchial data summary levels - 070 080 090),
   keyvars=slvl  state county areaname,
   keyfmats=slvl state county ,
   DataSource=%str(1990 Census, Summary Tape File 3),
   SortedBy=county areaname,
   UsageNotes=%nrbquote(<ul>
    </ul>),
   SetGroup=,
   Sortprio=6,
   URLMeta=%str(https://mcdc.missouri.edu/data/stf903/Docs),
   debug=0)

%let state=29; %let stab=mo; %let statenm=Missouri;
%doset(libname=stf903,memname=mobg9999,template=_template_9999,sortprio=2)
%let state=17; %let stab=il; %let statenm=Illinois;
%doset(libname=stf903,memname=ilbg9999,template=_template_9999,sortprio=6)


   