|
Hi Donald, as I already pointed out a UD(T)F is quite different from a stored procedure. A UDF (Scalar or Table) MUST have a return value. A stored procedure will never have a return value (except result sets!). In contrary to stored procedures only input parameter can be specified. Your stored procedure has no return value. That's why you get the decimal data error on the return value. And I assume you'll never get returned your output parameters. Birgitta -----Ursprüngliche Nachricht----- Von: midrange-l-bounces+birgitta.hauser=lp-gmbh.com@xxxxxxxxxxxx [mailto:midrange-l-bounces+birgitta.hauser=lp-gmbh.com@xxxxxxxxxxxx] Im Auftrag von Fisher, Don Gesendet: Freitag, 11. November 2005 14:48 An: 'Midrange Systems Technical Discussion' Betreff: RE: Accessing Service Programs from .NET I've been playing with UDTF's, too and haven't had much luck. It keeps telling me the function isn't found (see below). create function AFUNCTION (Parm1 CHAR (10), Parm2 CHAR (1), Parm3 CHAR (10), Parm4 CHAR (7), Parm5 CHAR (100)) RETURNS dec (4,0) language RPGLE is DETERMINISTIC NO SQL EXTERNAL NAME 'MYLIB/MYPGM(AFUNCTION)' select AFUNCTION('PARMVALUE', 'Y', ' ', ' ', ' ') from sysibm/sysdummy1 The service program exists and the function exists in the service program. What am I missing? Thanks. Donald R. Fisher, III Project Manager Roomstore Furniture Company (804) 784-7600 extension 2124 DFisher@xxxxxxxxxxxxx <clip> An alternative might be using UDTF (user defined table functions), but Creation and calling UDTFs are quite different from calling STORED PROCEDURES. <clip>
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.