|
Hi, First you need to create stored procedure referencing external RPG program and define your IN and OUT parameters. In your Java pgm: CallableStatement callStatement = connection.prepareCall("call libname.pgmname (?, ?, ?) "); // set your in parms values callStatement.setString(1, firstInParmValue); callStatement.setString(2, secondInParmValue); // register your RPG out parameter callStatement.registerOutParameter(3, java.sql.Types.DECIMAL); callStatement.execute(); BigDecimal r = (BigDecimal)callStatement.getBigDecimal(3); Alex Pinsky Aeropostale, Inc. -----Original Message----- From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]On Behalf Of Lim Hock-Chai Sent: Thursday, July 01, 2004 10:34 AM To: Java Programming on and around the iSeries / AS400 Subject: calling store procedure I know how to call a sql store procedure that return a result set but not sure how to call an external RPG store procedure that only accept parms and return the result in the parms. Does anybody have a sample code of that? -- 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. "The information contained in this email message and any attachments is confidential and is intended only for the use of the individual(s) or entity to which it is addressed. If you are not the intended recipient, you are hereby notified that copying, distribution or dissemination of this email and any associated documents is strictly prohibited. Thank you"
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.