×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




still reading the book, but the redbook Stored Procedures and Triggers on
DB2 Universal Database for iSeries has rpg as well as java examples
SG24-6503-00
hth
jim franz

----- Original Message -----
From: "Joe Pluta" <joepluta@PlutaBrothers.com>
To: <rpg400-l@midrange.com>
Sent: Thursday, February 21, 2002 11:18 PM
Subject: Stored Procedures in RPG


> Mohammad Tanveer asked a question a week or so ago about SQL stored
> procedures in RPG that piqued my interest.
>
> Let's say as a thought exercise that I decided to design a system where
> programs returned data exclusively via result sets.  This would have the
> portability benefits that are always mentioned when SQL is discussed.
>
> So, I would write "server" programs that returned result sets, and
"client"
> programs that asked for them.  I'm relatively comfortable with writing
> EXEC-SQL statement that actually do SELECT statements, but I guess I'm not
> sure about the syntax of calling a stored procedure, especially one that
> accepts parameters and returns a result set.
>
> I'm similarly in the dark about how the server program receives the
> parameter data and parses it out, and how it builds the result set and
> returns it, although my research so far shows that you basically create an
> array of records, and return it.  It's the exact syntax there that eludes
> me.
>
> So I guess I'm looking for an end-to-end example of an RPG program using
the
> stored procedure syntax of SQL to call a second RPG program that returns a
> result set.  If someone could point me in the right direction, I'd be much
> obliged, and I think this woud answer Mohammad's question as well.  (Well,
> I'm sure it's overkill for his question, but then I'm nowhere near as
versed
> in SQL as he and many of you are.)
>
> Joe
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-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-2026 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.