As Sergey said, make it local. In fact, all variables in a recursive function should be local (including parameters.) To make parameters local declare them with LPARAMETERS (instead of PARAMETERS.)
>Hi,
>
>I have a recursive function that uses an array to store data collected from a table. How can I protect this array from having its contents changed after the return of a recursive call?
>
>Let me try to explain better:
>
>
>Function recursive
>parameters x,y,z
>
>select a,b,c ;
>from tableX ;
>into array w
>
>recursive(a,b,c)
>
>
>
>How can I keep the contents of the array w that were select from tableX (1), after calling the function again (1), where another select will be done placing the result in the same array?
>
>TIA
>
>Alonso
Hector Correa