Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 6967
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 find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us