x cd /pub/data/acs2011/Tools; %let pgm=check_revised_basetbls; filename pgm "&pgm..sas"; *---This program looks at our collection of base tables and runs checks to see which ones actually have data in them. This was deemed necessary as we started running into problems with some tables being missing for all or many observations in various data sets. We are running this for the 2011 collections and need to run similar setup for prior and future vintages. jgb, 10-1--13. Revised 11-5-13 to remove references to PR tables. ---*; %let vintage=2011; filename modlcode "gen_tablevars.sas"; libname basetbls "/pub/data/acs&vintage./basetbls"; libname btabs (basetbls); libname btabs5yr "/pub/data/acs&vintage./btabs5yr"; *libname btabsR "/pub/data/acs&vintage./revised_basetbls"; *---Lets do btabsR - the "revised" base tables from GR - to see which tables we really have data for---; *---rerun with revised revised tables per note from GR: I'm running a new set of 2011 5-year base tables. The main group is copying over now. The new folder is at /web/mcdc/www/data/acs2011/revised_basetables_oct_2013/. Can you please check these for misses like you did before. ----*; libname btabsR "/pub/data/acs&vintage./revised_basetables_oct_2013"; /* ========================begin comment==================================== ods listing close; ods output attributes=attout; proc contents data=btabsr.ustabs00_075yr_moes ; proc contents data=btabsr.ustabs00_075yr ; run; ods listing; ==========================end comment====================================== */ options NOmprint; %macro dotabs(tgroups=00_07 08 09_16 17_20 21_24 25_27,setlvls=tabs tracts bgs); %local setlvl ilvl; %do ilvl=1 %to 3; %let setlvl=%scan(&setlvls,&ilvl); %if &setlvl=%str() %then %goto endmac; ods html file="&pgm._&setlvl..html"; %let ng=1; %let tgroup=%scan(&tgroups,1); %do %until (&tgroup=%str()); %*----note that we are back to using i1 instead of e1 -----*; %let e1vars=%varlist(*i1,btabsR.us&setlvl&tgroup.5yr); %unistats(data=btabsr.us&setlvl&tgroup.5yr,vars=&e1vars,stats=nmiss n,out=btabsR.unistats&tgroup&setlvl,print=N); title "Summary Report for Cell 1 Variables on Dataset btabsR.us&setlvl&tgroup.5yr (Rev. Oct 2013)"; footnote "Produced by job &pgm..sas in acs2011/Tools at &systime on &sysdate"; proc print data=btabsR.unistats&tgroup&setlvl (where=(nmiss)); id vname; run; %let ng=%eval(&ng+1); %let tgroup=%scan(&tgroups,&ng); %let e1vars=%str(); %end; ods html close; %end; %*--ilvl loop---; %endmac: %mend dotabs; %dotabs(setlvls=tabs tracts bgs) ;