Recursive call with DB/2

Hi All,
I have a problem calling a recursive routine in Natural DB/2. On the second call it returns a SQLSTATE error 24502 - cursor already open. The call is done within the loop of a Select statement. Some of the information I have gleaned from Google, seems to indicate that DB/2 only allows recursion if the SQL statements are within the context of a stored procedure.

Any comments and/or source code :slight_smile:

Thanks
Garth

Natural 3.1.06
DB/2 ??

Sorry, Garth, not a solution:
but we have some experience in our project. If You could provide the relevant source code of Select and nested Calls, we could have a look.

kind regards and a happy new year!
Friedhelm
http://www2.softwareag.com/de/solutions/XML_Solutions/Abag/default.asp