Page 1 of 1

Statement : 0 Message : (0168) - Recursive invocation of RDML level function detected.

Posted: Sun Aug 07, 2022 10:19 pm
by TF-Itservices
Hi All ,

Calling a function in BATCH iseries this error occurs.

Bericht . . . . : Fatal Error : Process : MATCHO RDML RPG Interface
Function : EABJMX Statement : 0 Message : (0168) - Recursive invocation of
RDML level function detected. Routine : X_Add_to_Invocation_Stack.
Oorzaak . . . . : dit bericht wordt gebruikt door toepassingsprogramma's al
een algemeen afbrekingsbericht.

Function KVAKEAB
Function Options(*NOMESSAGES *DEFERWRITE *DIRECT) Rcv_List(#XW_DATA #XW_DATSUP #XW_ASCII #XW_EFBKNM #XW_ADO #XW_ADL #XW_IMAEFB)


Call Process(*DIRECT) Function(EABJMX) If_Error(*NEXT) Pass_Lst(#X2_DATA #X2_DATSUP)
* EABJMX
* Create JSON vanuit EAB naar Match Online
* fromf KVAKEAB
Function Options(*NOMESSAGES *DEFERWRITE *DIRECT) Rcv_List(#X2_DATA #X2_DATSUP)


When i call this function in a interactive job this error isn't there! EABJMX run's nice.

Both interactive / batch Function (RDML) call's as RDMLX EABJMX.

Maybe there are some tricks to avoid this?


Thanks

Twan

Re: Statement : 0 Message : (0168) - Recursive invocation of RDML level function detected.

Posted: Tue Aug 09, 2022 1:59 am
by Dino
You will need to report this to support for investigation. I dont see a problem calling a function from another when it batch or interactive. I created this initial function:

Code: Select all

Function Options(*DIRECT)
Def_List Name(#list) Fields(#empno #salary) Type(*WORKING)
#salary := 7
Inz_List Named(#list) Num_Entrys(10)
Call Process(*direct) Function(test882) Pass_Lst(#list)
Message Msgtxt(#std_amnt.asstring)
which calls this second function:

Code: Select all

Function Options(*DIRECT) Rcv_List(#list)
Def_List Name(#list) Fields(#empno #salary) Type(*WORKING)
Selectlist Named(#list)
#std_amnt += #salary
Endselect
Exchange Fields(#std_amnt)
Return
and got my response, 70, in both batch and interactive, no errors.
Something else must be happening there.

Code: Select all

 DCM9899    Information             00   08/08/22  12:08:58.731508  DC@P9007     G14PGMLIB   *STMT    QCMD        QSYS      
                                      From module . . . . . . . . :   DC@P9007                                              
                                      From procedure  . . . . . . :   DC@P9007                                              
                                      Statement . . . . . . . . . :   229                                                   
                                      Message . . . . :   70.00                                                             
                                      This is a general purpose "text" message ... see first level text for details         
 CPF1164    Completion              00   08/08/22  12:08:58.733213  QWTMCEOJ     QSYS        0161     *EXT                  
                                      Message . . . . :   Job 137282/G14RAULO/TEST88PRO ended on 08/08/22 at                
                                        12:08:58; .020 seconds used; end code 0 .                                           
kind regards

Re: Statement : 0 Message : (0168) - Recursive invocation of RDML level function detected.

Posted: Tue Aug 09, 2022 5:16 pm
by René Houba
This has nothing to do with 'Interactive' or 'Batch'......

Twan created a new functionality to generate some Json data and send these via REST-API to a customer.

When he test this functionality ONLY, it works.

Now he has to implement this functionality into an existing program that is doing a lot of other things. As new extra he is doing the CALL to his new functionality and when he test it like that, the program fails with a recursive call.