Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to use an array as output parm in DB2 stored procedure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: How to use an array as output parm in DB2 stored procedure
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: 6970
Location: porcelain throne

PostPosted: Thu Dec 06, 2007 6:39 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Handling result sets in the calling N... Rusikesh DB2 7 Fri Apr 13, 2018 12:25 am
No new posts Duplicate PARM on OUTFIL sancraig16 SYNCSORT 11 Thu Apr 05, 2018 10:25 pm
No new posts How to get the output from submit com... Joanna2016 CLIST & REXX 10 Tue Feb 06, 2018 7:26 am
No new posts IPCONFIG SEGMENTATIONOFFLOAD parm in ... Keith Hays TSO/ISPF 0 Wed Jan 03, 2018 11:42 pm
No new posts CICS web service from DB2 Triggers or... kiranprasad DB2 2 Wed Dec 20, 2017 11:10 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us