select mastrfil scan scatter memvar if mod(recno(),1000) = 0 wait window nowait transform(recno()/reccount()*100,"999.999%") endif DO CASE CASE seek(branch+zip+address2+name1+name2,"trans") if empty(trans.match) replace trans.match with "O" m.match="O" endif CASE seek(branch+zip+address2+name2+name1,"trans") if empty(trans.match) replace trans.match with "D" m.match2 = "D" endif CASE SEEK(branch+zip+address2) m.match2="X" OTHERWISE m.match2= " " ENDCASE select mastrfil gather memvar endscanThere's no need to create new index every time you need one. You can create them in advance using ADDITIVE clause and switch them when appropriate using SET ORDERT TO.