CLOSE all USE tty in 0 m.telno=telno INDEX on telno TO gg SCAN FOR telno==m.telno IF FOUND() replace typ WITH 1 ENDIF ENDSCAN brow