I am facing SQL code -104 while executing a stored procedure.
I have used a dynamic cursor and while preparing the cursor it is throwing SQLCODE -104.
Cursor is declared as follows:
EXEC SQL
DECLARE C1 ASENSITIVE SCROLL CURSOR
WITH ROWSET POSITIONING WITH HOLD FOR DYNAMQRY
END-EXEC.
Prepare statement:
EXEC SQL
PREPARE DYNAMQRY FROM :W600-RESULT-STRING
END-EXEC
Here W600-RESULT-STRING is defined as
01 W600-RESULT-STRING.
49 W600-RESULT-STRING-LEN PIC S9(04) COMP.
49 W600-RESULT-STRING-TXT PIC X(3000).
Can anyone please look into this? Please let me know if I need to furnish more information.