x cd /pub/data/acs2009/Tools; %let pgm=basetables_keyvars; filename pgm "&pgm..sas"; *---Genreate the keyvars.html file with frequencies of a few key variables on the basetbls data sets--; title "&pgm: Values for Key Variables on All basetbls.ustabsXXXXX Data Sets"; %let year=2009; %let btpath=%str(/pub/data/acs&year./basetbls); libname basetbls "&btpath"; ods html file="&btpath/keyvals.html"; data freqin; set basetbls.ustabs00_07(keep=sumlev state geocomp); length variable $8 code $3 Meaning $64; variable='Sumlev'; code=sumlev; meaning=put(sumlev,$sumlev.); output; variable='State'; code=state; meaning=put(state,$state.); output; variable='Geocomp'; code=geocomp; meaning=put(geocomp,$geocomp.); output; keep variable code meaning; run; title 'Key Variable Codes Used on acs2009 Base Tables Data Sets'; proc sort; by descending variable; run; proc tabulate data=freqin; by descending variable; class code meaning; table code*meaning=" "; run; ods html close;