x cd /pub/data/acs2011/Tools; %let pgm=mcdcprofiles5yralt; filename pgm "&pgm..sas"; *--- Creates the usmcdcprofiles5yralt data set, a variation of usmcdcprofiles5yr2 data set. Next cycle (2012 vintage) we should incorporate this code as part of the usmcdcprofiles5yr setup. But for now it is simpler to just code a separate job to create a separate data set. When this is completed we shall remove the "2 suffix" data sets from public access and go with this alt version instead. The tract and bg level data with the moes segregated (grouped together at the end of the obs) are still available in separate data sets created by the mcdcprofiles5yr job. jgb, 10-31-13 ---*; %let year=2011; %let yr=%substr(&year,3,2); %let yearm4=%eval(&year -4); %let yrm4=%substr(&yearm4,3,2); libname acs "/pub/data/acs&year"; libname acs&year "/pub/data/acs&year"; options compress=binary; data acs.usmcdcprofiles5yralt(label='Alternate to usmcdcprofiles5yr: no trs bgs, moe vars segregated' index=(state)); length State Stab $2 Years $9 SumLev $3 Geocomp $2 Geoid $28 Areaname $100 geocomp_name $80; set acs.usmcdcprofiles5yr2; where not ( sumlev in ('150','140','080') ); years="&yearm4.-&year"; if geocomp='00' then geocomp_name='NA'; *--Stmt added after initial run. Use for do-overs--; format areaname geocomp_name ; run; proc datasets library=acs nolist; modify usmcdcprofiles5yralt; ***index create state; index create sumlev; quit; /* ========================begin comment==================================== *----Test access-----------; data x1; set acs.usmcdcprofiles5yralt(keep=_char_); where sumlev='160'; run; data x2; set acs.usmcdcprofiles5yralt(keep=_char_); where state='42' and sumlev='860'; run; ==========================end comment====================================== */