On 18/06/2009, at 6:29 AM, joe.kozlowski@xxxxxxxxxxxxxxxxxxxx wrote:
Create Function FmtName (slsnnm varchar (30) )
returns varchar(30)
language rpgle
deterministic
no sql
external name 'JJKLIB/GETNAME(FmtName) '
parameter style general
Function FMTNAME was created in JJKLIB.
Same errors exists as before
Not surprising. Although in your first attempt you told SQL the
function accepted and returned CHAR(30) variables you had defined the
RPG to use varying-length variables. Vern explained why that is a
problem if you pass literal parameters.
However the real problem appears to be a case issue. In your CREATE
statement note:
external name 'JJKLIB/GETNAME(FmtName) '
In the error message note:
2 -- Either the service program is not found or the program entry
point FmtName does not exist.
In the procedure exports note:
Procedure Exports:
Procedure Name
FMTNAME
In the prototype note:
D FmtName Pr 30a Varying
D SlsName 30a Varying Const Options(*Varsize)
Two solutions.
1) Ugly: change the external name to upper-case
2) Pretty: Specify the mixed-case name in EXTPROC keyword on the
prototype and enclose in single quotes
Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists
http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.