DB2 and Stored Procedures

DB2 and Stored Procedures

Post by jame » Tue, 22 Sep 1998 04:00:00



Hi All

I am having tremendous difficulty in getting a Stored Procedure to return a
ResultSet for DB2 using Java as the calling client and stored procedure.

Has anybody done this ?

It would be much appreciated if someone can post some sample code.

Thanks in advance.

 
 
 

1. DB2 - Global Stored Procedure in Stored Procedures

Hi!

Background:

I am working on a web project which will extract data from DB2 on IBM
mainframe and make it available to requests from clients (Web appl. on
Java platform). For this, we are designing Stored Procedures which will
be invoked by the Java clients.

Queries:

1.  A Global Temporary Table is declared in a Stored Procedure and then
    is populated with data from other cateloged DB2 tables. On
    completion of the inserts to the temporary table, a cursor is
    declared (with the WITH RETURN FOR option) and opened to fetch all
    the rows of the Global Temporary Table. On on exiting the Stored
    Procedure, will the calling Java routine have access to the cursor
    (recordset)? In other words, will the life of the Global Temporary
    Table be limited to the life of the Stored Procedure and die on exit
    of the Stored Procedure, or extend to the calling routine too? If
    the calling Java routine has access to the cursor (recordset), will
    DB2 delete the Global Temporary Table after the Java routine ends?
    If not, when will it?

2.  This query is an extension of (1) above. If a Global Temporary
    Table is created in a Stored Procedure A and another Stored
    Procedure B, invokes A, will the rows of the Global Temporary Table
    be accessible by B? If not, can this be made to, by adding/changing
    any parameter(s) of the SQL which is used to create the Global
    Temporary Table?

Thank you in adavnce.

--
www.MainFrameForum.com - USENET Gateway

2. Oracle 8.1.6 for Solaris Intel platform

3. DB2 Java Stored procedures

4. Standard Engine Vs Online Engine

5. Receiving resultsets from DB2 V5 stored procedures

6. 2nd execute of SP

7. DB2 Java stored procedures privileges

8. Archive Question

9. DB2 java stored procedure

10. Win2k - DB2 / Compiling stored procedures - V7

11. DB2 SQL Stored Procedure

12. db2 EE stored procedures - how good are they?

13. Writing from a DB2 SQL stored procedure to an OS (flat) file