|
Aaron, no need to create a "junk pf", as the system provides them. One is called QSQPTABL, and is a single record, single field file, and lives in QSYS2. eg SELECT IWAY_TEST1( char(123)) FROM QSQPTABL another one is SYSDUMMY1 in SYSIBM cheers Colin.W ----- Original Message ----- From: "Bartell, Aaron L. (TC)" <ALBartell@xxxxxxxxxxxxxx> To: "Java Programming on and around the iSeries / AS400" <java400-l@xxxxxxxxxxxx> Sent: Thursday, July 01, 2004 3:46 PM 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. > > This e-mail has been sent by a company of Bertram Group Ltd, whose registered office is 1 Broadland Business Park, Norwich, NR7 0WG. This message, and any attachments, are intended solely for the addressee and may contain privileged or confidential information. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. If you believe that you have received this email in error, please contact the sender immediately. Opinions, conclusions and statements of intent in this e-mail are those of the sender and will not bind a Bertram Group Ltd company unless confirmed in writing by a director independently of this message. Although we have taken steps to ensure that this email and any attachments are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free.
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.