x cd /pub/data/acs2011/Tools; %let pgm=fixprofiles2; filename pgm "&pgm..sas"; *---Update the acs.usmcdcprofiles5yr2 data set from the new _fixed version created by Glenn circa 6-4-13. We replace the geoid so that it is not truncated. It changes from $20 to $28 . For 080 and 070 levels it is critical. IMPORTANT NOTE: After verifying this job ran OK, we interactively renamed the 2 5yr2 datasets, so that *5yr2 becomes *5yr2old and *5yr2f becomes the new *5yr2 . jgb, 6-5-13. ---; libname acs2011 '/pub/data/acs2011'; /* ========================begin comment==================================== data acs2011.usmcdcprofiles_geoidfixes(label='Extract from GRs usmcdcprofiles5yr_fixed' compress=no index=(obsno)); set acs2011.usmcdcprofiles5yr_fixed(keep=geoid); obsno+1; if length(geoid) >= 20; *--we only keep the long ones---; run; ==========================end comment====================================== */ data acs2011.usmcdcprofiles5yr2f(compress=binary index=(state)); length geoid $28; set acs2011.usmcdcprofiles5yr2(rename=(geoid=_ckid)); obsno+1; drop obsno; if length(_ckid)=20 then do; set acs2011.usmcdcprofiles_geoidfixes key=obsno; _nfixed+1; if _nfixed le 5 then put obsno= _iorc_= geoid= ; end; else geoid=_ckid; if not (_ckid =: geoid) then do; put '***logic problem*** ' obsno= _ckid= geoid= ; abort abend; end; drop _: ; run;