x cd /pub/data/acs/Tools; %let pgm=merge_acs_1year; filename pgm "&pgm..sas"; /* This program takes a dataset for each acs year and combines it into a single data set in the acs directory BCE (09/24/2008) */ libname acs2007 '/pub/data/acs2007'; libname acs2006 '/pub/data/acs2006'; libname acs '/pub/data/acs'; data temp2007; set acs2007.usmcdcprofiles; length yeargeoid $25; year='2007'; yeargeoid=cat('2007', geoid); if sumlev in ('010', '020', '030', '040', '050', '060', '160', '310', '400', '500', '795'); acstype=1; run; data temp2006; set acs2006.usmcdcprofiles; length yeargeoid $25; if sumlev in ('010', '020', '030', '040', '050', '060', '160', '310', '400', '500', '795'); year='2006'; yeargeoid=cat('2006', geoid); acstype=1; run; data acs.usmcdcprofiles_1yr; length Year $4 Geocomp $2; set temp2007 temp2006; geocomp=substr(geoid,4,2); run; proc sql; create index yeargeoid on acs.usmcdcprofiles_1yr (yeargeoid); quit;