× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



James,

In order to return any result set to an external client from a stored proc...

Simply declare your cursor
WITH RETURN TO CLIENT

the last step in your SP should be a simple open of the cursor...

CREATE PROCEDURE GetCusNames()
RESULT SETS 1
LANGUAGE SQL
BEGIN
DECLARE c1 CURSOR WITH RETURN TO CLIENT FOR
SELECT cusnam FROM customer ORDER BY cusnam;
OPEN c1;
END

HTH,
Charles

On Tue, Apr 19, 2011 at 1:19 PM, James Lampert <jamesl@xxxxxxxxxxxxxxxxx> wrote:
BIRT (which uses JDBC and JT400) doesn't appear to like UDTFs. But it
seems to like Stored Procedures that return a result set.

Most of the examples I've seen simply have a SELECT (without an INTO
clause) in the stored procedure. But DB2/400 doesn't seem to like
SELECTS without INTO clauses in stored procedures.

Then there is at least one example I've seen that uses a cursor as a
parameter, but that doesn't look very promising for DB2/400, either.

Can somebody point me in the right direction here?

--
JHHL

--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.