HI
1. Method 1...
Create the index file using the following code.
myIndexFile = "I"+SUBSTR(SYS(2015),4)+".IDX"
INDEX ON myField TO (myIndexFile)
at the cleanup level after the closing of file.. delete the file created with code..
DELETE FILE (myIndexFile)
2. Method 2...
While creating the cursor.. create it as a DBF table..
myFile="T"+SUBSTR(SYS(2015),4)
SELECT * FROM myTable INTO DBF (myFile)... etc..
Then create the index as a TAG and .CDX way. This will create the index TAG
At the cleanup code place.. you can delete the files using code..
DELETE FILE myFile+".DBF"
DELETE FILE myFile+".CDX"
Hope this helps you

ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com