x cd /pub/data/acs2005/Tools; %let pgm=cnvt_xtract; filename pgm "&pgm..sas"; *---Create the acs2005.xtract dataset with our standard extract from the 2005 base tables. Reads data from the btabs sub-directory collection and reads the variable defns from the invoke_dovars.sas module in this same directory. Most invoke_dovars coding by E. Cleveland. This module by J. Blodgett. Sept. 2006. ---*; %let year=2005; libname btabs "/pub/data/acs&year/basetabs"; libname ctabs "/pub/data/acs&year/basetabs"; libname acs "/pub/data/acs&year"; title "acs2005: &pgm"; %let dvmode=meta; data acs.variables; %include 'invoke_dovars.sas'/source2; run; proc print data=acs.variables; title2 'acs.variables'; run; data btabs_set1; *----We run into space problems if we have to have all these tables open at once. So we combine some of them in an extra step here.---; merge btabs.b01001 btabs.B02001 btabs.b03002 btabs.b05002 btabs.b05005 btabs.b05006 btabs.b08013 btabs.b08008 btabs.b09016 btabs.b11001 btabs.b12001 btabs.B08103 btabs.B15002 btabs.b17001 btabs.B17002 btabs.b18001 btabs.b18008 btabs.b19013 btabs.b21001 btabs.b23001 btabs.b19025 btabs.B19062 btabs.b19065 btabs.b19066 btabs.B19067 btabs.b19069 btabs.B10010 btabs.B19127 btabs.B19301 btabs.B20001 btabs.B20003 btabs.b25001 btabs.b25002 ; by geoid; ***if _N_ gt 5 then stop; *<=========================Test Run============================; run; %let dvmode=data; data acs.xtract(label="Standard Extract for &year, all geographies" ); merge btabs_set1 btabs.B25024 btabs.b25003 btabs.b25010 btabs.B25034 btabs.B25035 btabs.B25038 btabs.B25039 btabs.b25063 btabs.b25064 btabs.b25065 btabs.B25075 btabs.b25107 ctabs.C06007 ctabs.c07001 ctabs.c08007 ctabs.C08101 ctabs.c08012 ctabs.C14002 ctabs.c17012 ctabs.c17017 ctabs.c17021 ctabs.c18001 ctabs.c18008 ctabs.c19001 ctabs.c24040 ctabs.C24060 ctabs.c25014 ctabs.C25043 ctabs.C25045 ctabs.C25050 ctabs.C25079 ctabs.C10001; by geoid; ***if _N_ gt 5 then stop; *<=========================Test Run============================; %include 'invoke_dovars.sas'/source2; keep _character_ TotPop -- Child_MOE; drop _: ; run; proc print data=acs.xtract; where state='29' and sumlev in ('040','050'); title2 'acs.xtract - MO state and counties only'; run; %include sascode(notify);