In a COBOL-DB2 program, I have an existing Multi-fetch Cursor that fetches upto 30 rows from a group of tables (join).
DECLARE ABC CURSOR WITH ROWSET POSITIONING FOR ...
I fetch 30 rows at a time in this program using the cursor.
FETCH NEXT ROWSET FROM ABC FOR 30 ROWS...
I have a requirement where I have to use another cursor within the loop that fetches rows from the above multi-fetch cursor, to retrive some fields from a different row(s) of the same table.
I have taken care of moving the SQLCODEs and SQLERRD(3) values to a working storage so that the new cursor doesn't interfere. But will this new cursor reset the ROWSET pointer when I try to fetch the next set of 30 rows from the multi-fetch cursor?
P.S : The reason why I have to include the new cursor is that I have a specific use case around the new select returning multiple rows. I couldn't use the -811 logic since my program uses "WHENEVER SQLERROR" to force an ABEND.