>Using the following code i am getting error as Error Subscript is outside defined Range.
>Not able to solve it, kinldy Correct
Harsh,
SET STEP ON and go through your code line by line to figure out the cause. The error you're getting indicates your array size is 5 elements, for example, and you're trying to reference element 6 or later.
Running through a single iteration, and then trapping to the debugger, will let you examine the values of loop variables, record numbers, whatever you need to then put a SET STEP ON in your code under those conditions:
IF RECNO() >= 700 AND i >= 5
SET STEP ON
ENDIF
Such tests will allow you to step through your code, examine the variables, and correct it. Natural debugging.