×

Good News Everybody!

The new search engine is LIVE!

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




If you're just calling RPG to run an SQL statement, you might consider just moving the SQL statement to an SQL stored procedure. You can create that in a few minutes, either by entering code or by using tools in the System i Navigator.

This link (http://systeminetwork.com/node/26113) is an article that shows some examples of SQL stored procedures. It also shows how you can code an SQL stored procedure that returns two result sets to a .NET application. One possible use of multiple result sets is where you need a header followed by details (for example, get a customer master record and all of the orders for the customer).

This link (http://systeminetwork.com/node/26082) shows how to define an external stored procedure (in the article, an RPG program) for use with .NET applications.

Craig Pelkie


----- Original Message ----- From: <DLee@xxxxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Sent: Wednesday, April 22, 2009 12:29 PM
Subject: Re:External Stored Procedures with Imbedded sqlrpgle


Pat

Thanks for your replay

No but I thought it might look something like this:

/EXEC SQL
+ CREATE PROCEDURE CRPRDLIBTS/STR005SP
(IN LNAM VARCHAR ( 35),
IN FNAM VARCHAR ( 25),
IN POLM CHAR ( 10) ), (
RESULT SETS ?
LANGUAGE RPGLE
SPECIFIC CRPRDLIBTS/STR004SP
NOT DETERMINISTIC
READS SQL DATA
CALLED ON NULL INPUT
EXTERNAL NAME CRPRDLIBTS/STR005CL
PARAMETER STYLE GENERAL
/END-EXEC

Thanks for your help.

Darrell Lee
Information Technology
Extension 17127
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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.