x cd /pub/data/stf420/Tools; %let pgm=invoke_dosets; filename pgm "&pgm..sas"; /*--Invoke the %doset macro to create observations in the Datasets dataset for this directory. jgb, OSEDA, May, 2008 -- */ title "Job to Invoke doset Macro for Sets in stf420, creating stf420.datasets"; libname stf420 '/pub/data/stf420'; *-----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=stf420,debug=1); *----------------------------------------------------------------------; options mprint; %***let todo=key_indicators; %macro doit(state,stab); %doset(mode=,libname=stf420, memname=&stab.totals, sortprio=1, memlabel=%str(&statenm Total Workers by POW), geouniv=&statenm, units=%nrbquote(county tract place/county), Year=1990, CreatePgm=cnvt420a, Keywords=commuting workers pow 1990 census &statenm, Description=%nrbquote(For various resident geographies provides counts of workers in those areas by 20 county-dependent custom work locations. &statenm resident geography only.), keyvars=slvl county placefp msacmsa, keyfmats=sumlev county fplace metro, keyquals= | | state, DataSource=%str(Census Bureau, 1990 Census), SortedBy=slvl, UsageNotes=%nrbquote(), SubType=totals, SetGroup=, VarSet=, debug=1); %doset(mode=,libname=stf420, memname=&stab.raceh, sortprio=3, memlabel=%str(&statenm Workers by POW by Race and Hispanic Origin), geouniv=&statenm, units=%nrbquote(county tract place/county by race/hispanic), Year=1990, CreatePgm=cnvt420a, Keywords=commuting workers pow 1990 census &statenm race hispanic, Description=%nrbquote(For varying resident geographies provides counts of workers in those areas by 20 county-dependent custom work locations. &statenm resident geography only. Each obs is for a specific Race / Hispanic group.), keyvars=slvl county placefp msacmsa race hispanic racspan , keyfmats=sumlev county fplace metro | | racspan, keyquals= | | state, DataSource=%str(Census Bureau, 1990 Census), SortedBy=slvl, UsageNotes=%nrbquote(), SubType=raceh, SetGroup=, VarSet=, debug=1); %doset(mode=,libname=stf420, memname=&stab., sortprio=5, memlabel=%str(&statenm Workers by POW: Full Original Data), geouniv=&statenm, units=%nrbquote(county tract place/county by race/hispanic), Year=1990, CreatePgm=cnvt420, Keywords=commuting workers pow 1990 census &statenm race hispanic, Description=%nrbquote(This dataset has data in the format as originally released by Census. We strongly discourage use and we may at some point remove this dataset. Use the alternative datasets &stab.totals and &stab.raceh, which are easier to use and have variables with much more mnemonic names. There are lots of irrelevant geographic codes on this dataset.), keyvars=slvl county placefp msacmsa , keyfmats=sumlev county fplace metro , keyquals= | | state, DataSource=%str(Census Bureau, 1990 Census), SortedBy=, UsageNotes=%nrbquote(), SubType=original, SetGroup=, VarSet=, debug=0); %mend doit ; options mprint; %dostates(17,names=1); proc sort data=stf420.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 stf420.datasets (Sorted by SortPrio)'; run ; proc datasets library=stf420 nolist; modify datasets; index delete dataset memname; index create dataset=(libname memname) / unique; index create memname; quit; options NOmprint msglevel=i; **include '/pub/sas/macros/gendshtm.sas'; %gendshtm(libname=stf420,debug=1,runprocc=1);