x cd /pub/data/sf12000/Tools; %let pgm=create_indices; filename pgm "&pgm..sas"; *---experiment with creating indices on sf12000 data sets to see what kind of access speed enhancements we can get. ---*; libname sf12000 '/pub/data/sf12000'; options msglevel=i fullstimer; /*<=========================Comment out===================================== *--sample extract without index--; data one; set sf12000.ilph(keep=_char_ pop100); where sumlev='871'; run; *--create an index on the geos data set--; proc datasets library=sf12000; modify ilgeos; index create sumlev; index create county; data one; set sf12000.ilph(keep=_char_ pop100); where sumlev='871'; run; ===========================End commented out================================ */ *---try some strategies for getting better time. Using a where on the ph data set, the index was not used-; proc sql; create table two as select * from sf12000.ilphng(keep=geo_id p18i1-p18i15) where geo_id in select geo_id from sf12000.ilgeos(idxname=sumlev) where sumlev='881' and county='17163';