x cd /pub/data/acs2012/Tools; %let pgm=update_sld_names; filename pgm "&pgm..sas"; *---The Bureau released the first set of 5yr data for 601 and 620 level data with names indicating they are 2010 vintage geography. We want to edit the Areaname variables for these summaries replacing the 2010 with 2012. Per notes exchanged in sdc-l on 1-14-14 indicating the Bureau recognizes these names are confusing and will be fixing this on future releases. jgb, 1-15-14. ---*; libname acs2012 '/pub/data/acs2012'; libname acs (acs2012); options compress=binary; /*<=========================Comment out===================================== data acs.moslds5yr; set acs.uscdslds5yr (where=(sumlev in ('610','620'))); *--create a new data set and then use it as the test case to make sure our updating macro works.---*; run; %let dset=moslds5yr; ===========================End commented out================================ */ %macro fix(dset); %*---We are modifying the macro so that on these last runs all we are doing is redefining the indices. Editing already ran.-; /*<=========================Comment out===================================== data acs.&dset; set acs.&dset; if sumlev in ('610','620') then AreaName=tranwrd(Areaname,'(2010)','(2012)'); run; ===========================End commented out================================ */ proc datasets nolist library=acs; modify &dset; index create sumlev; index create state; quit; %mend fix; options mprint; %**fix(usmcdcprofiles_2008_2012) ; %fix(usmcdcprofiles5yr) ; %fix(usmcdcprofiles5yralt); %fix(uscdslds5yr); %**fix(allgeos2008_2012);