|
Vern At 07:51 PM 7/9/2005, you wrote:
Okay, I'm around the bend on this one. I've checked Rob B's detailed example from April 2005 and I'm still befuddled. I don't seem to be able to get stored procedures working when I compile them using RUNSQLSTM; I have another simple SQL stored procedure which compiles but also gets a "not found" but works when I enter it from OpsNav. I'm on V5R3 with all the goodies installed. Here's my QSQLSRC source member. It compiles okay with RUNSQLSTM (according to the listing). Nothing shows up with WRKOBJ but I can see it with OpsNav. create function TEST/SPS011 (dec (15,2), char (2), char (2), date) returns dec (15,2) language RPGLE is deterministic no SQL returns null on null input no external action allow parallel simple call external name 'TEST/SVV011(SVV011)' The service program SVV011 has a single procedure, SVV011, and it's in production. I use binder language, not EXPORT(*ALL). The prototype looks like this: Dsvv011 pr 15 2 D Qold_amount 15 2 const D Qbase_currency 2 const D Qnew_currency 2 const D Qeff_date d const datfmt(*iso) When I add TEST to the top of the library list and STRSQL this statement: SELECT ordernum,order,amount,sps011(amount,'CA','US',current_date) as newamt from orders I get this: SPS011 in *LIBL type *N not found. "Amount" is (9,2). The SQL Reference Manual advises the function signature is made up from the number of parameters and data types, not size. My SQL attributes have the date format set to *ISO I'm using DAFMT(*ISO) on the RUNSQLSTM command. Should the stored procedure be in the same schema (library) as the table? Do I have a problem with the function signature? Is this not allowable with interactive SQL? Or is there something else I've missed? Thanks, Guth -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.