× 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.



Thanks for your reply Elvis
The more I look into this, the more I'm in agreement with you.



Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxxxxx
P:(631) 244-2000 ext. 5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill

midrange-l-bounces@xxxxxxxxxxxx wrote on 09/04/2008 11:02:18 AM:

UDF(s) will work if you need to return a single value only. Of course,
you'd need multiple UDFs to return multiple values from the data area.
They
could all be part of a single service program, but multiple CREATE
FUNCTIONs
would need to be run.

External Stored Procedure would work as well, as long as you're OK with
the
limitation that it has to be invoked in SQL as a standalone call, i.e.
CALL
dataAreaStoredProcedure(...), not part of another SQL statement (i.e.
SELECT
...).
Stored Procedure could return the values as output arguments, or as a
result
set (less attractive solution in this case).

For my money, UDTF is the most elegant solution.
You can treat it as just another table (i.e. join to another, 'real'
table)
and leverage it in any SQL statement (i.e. SELECT * FROM table(...) WHERE
...).

HTH, Elvis

Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com


-----Original Message-----
Subject: Reading a data area in SQL

Morning all
does anyone know of a way to "read" a data area within SQL
My investigation, so far, has unearthed the following web page

http://www.itjungle.com/fhg/fhg051904-story03.html

but this entails writing a table function.
I was wondering if there was any other way.
By the way I am on V5r4

Alan Shore

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-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.