Hello,
I'd like to "re-Declare" a SQL cursor in my SQLRPGLE program. Of course, the compiler won't let me do this, since it only allows a cursor to be Declared *once* in the program.
The compile error I get is "SQL0051: Cursor Previously Declared".
A cursor may be Closed and re-Opened any number of times, but can only be Declared *once*. Is there any way to get around this? I'd like the program to "forget" that the cursor was ever Delcared, so that I can re-Declare it (with a different Order clause) later in the program.
I'm sure other people have encountered this problem using embedded dynamic cursors. Any help would be greatly appreciated. Thanks.
Chris
I'd like to "re-Declare" a SQL cursor in my SQLRPGLE program. Of course, the compiler won't let me do this, since it only allows a cursor to be Declared *once* in the program.
The compile error I get is "SQL0051: Cursor Previously Declared".
A cursor may be Closed and re-Opened any number of times, but can only be Declared *once*. Is there any way to get around this? I'd like the program to "forget" that the cursor was ever Delcared, so that I can re-Declare it (with a different Order clause) later in the program.
I'm sure other people have encountered this problem using embedded dynamic cursors. Any help would be greatly appreciated. Thanks.
Chris
Comment