The above topic is about the basics of cursors in cobol db2 application program. For Further Reading==>
The scope ofcursor-nameis the source program in which it is defined; that is, the application program submitted to the precompiler. Thus, you can only refer to a cursor by statements that are precompiled with the cursor declaration. For example, a COBOL program called from another program ca...
To resolve this issue I have used the SELECT statement as given below in DECLARE CURSOR to get 3 rows but it is giving me RECURSIVE ERROR in COBOL-DB2 program. Now the only option left with me to break the subquery and use in COBOL-DB2 program to get values on the fly to fullfill ...