I have written DB2 stored procedure in which a cursor is used to return the result set to the java application calling the SP. I am using temporary table in the SP which sholud be replaed by an array/internal table.
In the SP(stroed procedure) I need to use an array (internal table) to populate the result and return it to the java application.
Please give me suggestions on how to achieve it.
? How to code the stored procdure specifying the array as the output parameter.
?how to receive the output (array returned) in the java application.
Note: The stored procedure is coded in COBOL.
Joined: 20 Oct 2006 Posts: 6970 Location: porcelain throne
since the stored procedure is called by the java application, the parameter is defined by your java application. defining an array (internal cobol table) is no biggy. There are many examples in the db2 sql reference for whichever db2 vsn you are running. populating the cobol table from your cursor will be no more difficult that populating an interface definition (parameter) with multiple results rows.