On 12-Sep-2016 14:17 -0500, Alan Shore wrote:
On 12-Sep-2016 06:39 -0500, Alan Shore wrote:
Before I forget - we have JUST (this past weekend) converted to
V7r1 (from V5r4)
We have a function that was created from a procedure in a service
program that was working on V5r4 Here is how the function was
created

CREATE FUNCTION PRODPA/GETTRACKINGNUM (
INYY NUMERIC(2, 0) ,
INMMDD NUMERIC(4, 0) ,
INXXXX NUMERIC(3, 0) ,
INORD VARCHAR(2) ,
INSP NUMERIC(3, 0) )
RETURNS CHAR(50)
LANGUAGE RPGLE
SPECIFIC PRODPA/GETTRACKINGNUM
NOT DETERMINISTIC
NO SQL
CALLED ON NULL INPUT
DISALLOW PARALLEL
EXTERNAL NAME 'PRODPA/ORDERSP(GETTRACKNO)'
PARAMETER STYLE SQL

Here is the prototype for said procedure
D GetTrackNo PR 50
D in_yy 2S 00 CONST
D in_mmdd 4S 00 CONST
D in_xxx 3S 00 CONST
D in_ordnum 2A VARYING
D in_spnum 3S 00 CONST
[…]

[…] It is in the create function
I had created the function using
PARAMETER STYLE SQL
It should have been
PARAMETER STYLE general

I dropped the function and created it again (the correct way)
It is now working

Too bad nobody pointed out that same flaw, earlier this year, before the upgrade, after revealing a similar FUNCTION and mismatched PI issue in the topic:

Subject: RE: problem with SQL function created from procedure in service program
[http://archive.midrange.com/midrange-l/201604/msg00828.html]

Hopefully that coding, failing to match the PARAMETER STYLE, was not too pervasive.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.