IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to use an array as output parm in DB2 stored procedure


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kalais

New User


Joined: 18 Apr 2006
Posts: 22

PostPosted: Thu Dec 06, 2007 3:49 pm
Reply with quote

Hi,

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.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Dec 06, 2007 6:39 pm
Reply with quote

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.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts JCL EXEC PARM data in C Java & MQSeries 2
No new posts Need to specify PARM='POSIX(ON) Java & MQSeries 4
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts How to pass the PARM value to my targ... COBOL Programming 8
Search our Forums:

Back to Top