|
I should note a couple things that probably don't make sense. You should take off the 'IWAY_' portions on the CREATE function so it relates directly to TEST1. IWAYSV is the name of the service program that I compiled TEST1 into. Sorry for being unclear the first time. Let me know if it is still unclear. Aaron Bartell -----Original Message----- From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bartell, Aaron L. (TC) Sent: Thursday, July 01, 2004 9:47 AM To: Java Programming on and around the iSeries / AS400 Subject: RE: calling store procedure I just got done teaching a vendor how to do this who is trying to sell me his product that is suppose to do the same thing :-) Check out the below email. . . HTH, Aaron Bartell Here is how you make the final call. Note that you need to have a reference to a file for a SELECT statement to work. I just created a PF with one field. You can do it from RPG using the SET SQL command but that wouldn't make sense to do it form there. SELECT IWAY_TEST1( char(123)) FROM albartell/junkpf Here is the code necessary to interface with the below sub procedure. CREATE FUNCTION QGPL.IWAY_TEST1 ( FLD1 CHAR(30) ) RETURNS CHAR(30) LANGUAGE RPGLE SPECIFIC QGPL.IWAY_TEST1 DETERMINISTIC NO SQL RETURNS NULL ON NULL INPUT NO EXTERNAL ACTION EXTERNAL NAME 'EBTOOLS/IWAYSV(TEST1)' PARAMETER STYLE GENERAL ; //-------------------------------------------------------------------------- ------------------ // @Author - Aaron Bartell // @Description - This is a simple sub proc that receives in a alpha(30) and outputs a // alpha(30) field. // @Usage - //-------------------------------------------------------------------------- ------------------ P test1 B Export D test1 PI 30A D pInput 30A Const /Free Return pInput; /End-Free P test1 E -- This is the Java Programming on and around the iSeries / AS400 (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 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.