UDFx error 42884

Any IBM i topic that does not fit in another forum
Post Reply
gio.cot
Posts: 20
Joined: Sat May 28, 2022 9:08 pm

UDFx error 42884

Post by gio.cot »

Hi all
I'm plyaing with UDFx
I have registered ths UDF
CREATE OR REPLACE FUNCTION mylib.ZGIACART_Z (
CODART VARCHAR(17) ,
DATARIF decimal(8, 0)
)
RETURNS TABLE (
mag char ( 2),
art char ( 17),
cau decimal ( 3 , 0),
GIACENZA DECIMAL( 15 , 3)
)
LANGUAGE RPGLE
PARAMETER STYLE DB2SQL
-- SPECIFIC GIACENZART
NOT DETERMINISTIC
-- MODIFIES SQL DATA
-- no sql
DISALLOW PARALLEL
EXTERNAL NAME 'mylib/ZGIACART';
This the SQLRPGLE input :
**FREE
ctl-opt dftactgrp(*no) option(*nodebugio) ACTGRP(*NEW) ;

// ctl-opt DFTACTGRP(*NO) ACTGRP(*NEW);

dcl-pi *n;
pCodArt varchar(17) const;
pDataRif packed(8: 0) const ;
// Output fields
oMag char(2);
oArt char(17);
oCau packed( 3 : 0 );
oGiacenza packed(15:3);
// Null indicators
nCodArt ind ;
nDataRif ind ;
nMag ind ;
nArt ind ;
nCau ind ;
nGiacenza ind;
// SQL parms
xsqlState char(5);
funcName varchar(517) const;
specName varchar(128) const;
msgText varchar(1000);
callType int(10) const;
end-pi;


when i try to invoke the UDF via Sql

select * from table(mylib.ZGIACART_Z('020146 ' , 20261231 )) ast;

i receive Message: SQL: 42884

[SQL0440] The routine ZGIACART in mylib was not found with the specified parameters. Cause. . . . . : A function or procedure with the specified name and compatible arguments was not found. This could be due to a permission error. Correction . . . : Specify the correct number and type of parameters in the CALL statement, CREATE OR REPLACE statement, or function invocation.
Retry the request.

Where am I wrong ?

Thanks in advance
gio.cot
Posts: 20
Joined: Sat May 28, 2022 9:08 pm

Re: UDFx error 42884

Post by gio.cot »

Hi all
The problem was in RPGLE ctl-opt "ACTGRP(*NEW) "
Runnig dspjob from 5250 i have found :
"Message ID . . . . . : CPF426A
Sent Date . . . . . . : 07/04/26 Sent Time . . . . . . : 12:16:36 PM Message . . . : The user-defined function ZGIACART_Z cannot be called.
Cause . . . . : An external program or a ZGIACART service program in the mylib library associated with the user-defined function ZGIACART_Z in the mylib library cannot be called due to reason code 5. The reason codes and their meanings follow:
....
5 -- The program or service program specifies ACTGRP(*NEW)."
From ACS SQL console, id there anyway to see all job message that i see in 5250 ??

Thanks all
Post Reply