close data
set cent on

sele 1
use TOW
copy stru to IND fiel INDEKS
use IND

sele 2
use SL_MAG
go top
do while !eof()

 mm="MAG"+SL_MAG->NR_MAG

 sele IND
 appe from &mm

 sele SL_MAG
 skip
endd


sele IND
appe from TOW for INDEKS="9"
index on INDEKS to kk uniq
copy to IND_NEW
close data

