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: 6968
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 Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 8 Thu Jun 29, 2017 1:41 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm


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