I need to invoke a stored procedure (SQL) from a COBOL program. The stored procedure returns ONE result set, so the last (meaningful) statement in the stored procedure is OPEN cursor name.
PLease let me know how will I do this?
It will of great help if anyone can provide me the sample code for this?
My question is that When I call the stored procedure from the Cobol program then how will the SP(Stored Procedure) returns the resultset back to the calling program and how will the calling Program will handle it.As the last meaningful statement in the SP is OPEN Cursor.
In our shop, JAVA program extracts the result set. Open cursor will open the cursor and make available the rows to extarct either thru front end (like JAVA)or back end (Cobol-db2 program that calls SP).
As for as I know if u want to extract rows from back end, you have to fetch the rows from the program that calls the SP.