JSON Iseries batchjob

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
TF-Itservices
Posts: 4
Joined: Tue Mar 08, 2022 6:32 pm

JSON Iseries batchjob

Post by TF-Itservices »

Hello All ,

I have a new RDMLX function created in windows server using the commands below.
On this server this runs OK!

Fuction is checked to Iseries. It's been called in a batch job from RDML function. .

This doesn't work. Error ,Message

Bericht-ID . . . . . . : CPF9898
Datum verzending . . . : 02/06/22 Tijdstip verzending . : 07:34:24

Bericht . . . . : Fatal Error : Process : LVSMOL RDML RPG Interface
Function : EABMOL Statement : 0 Message : (0168) - Recursive invocation of
RDML level function detected. Routine : X_Add_to_Invocation_Stack.

I don't be sure if this kind of function can run on the Iseries.

Maybe some system parameters have to be set. t

Maybe there are tips&tricks



Thanks

Twan


Define_Com Class(#XPRIM_Json) Name(#json)
Define_Com Class(#XPRIM_JsonObject) Name(#jsonObj) Reference(*DYNAMIC)
Define_Com Class(#XPRIM_JsonObject) Name(#jsonpartijObj) Reference(*DYNAMIC)
Define_Com Class(#XPRIM_JsonObject) Name(#jsonkenmerkObj) Reference(*DYNAMIC)
Define_Com Class(#XPRIM_JsonObject) Name(#jsonfotoObj) Reference(*DYNAMIC)
* array
Define_Com Class(#XPRIM_JsonArray) Name(#jsonpartijArray) Reference(*DYNAMIC)
Define_Com Class(#XPRIM_JsonArray) Name(#jsonkenmerkArray) Reference(*DYNAMIC)
Define_Com Class(#XPRIM_JsonArray) Name(#jsonfotoArray) Reference(*DYNAMIC)
* token
Define_Com Class(#MOAPIAUT) Name(#MOAPIAUT)
Define_Com Class(#Prim_dc.UnicodeString) Name(#u_Token)
Define_Com Class(#XPRIM_HttpRequest) Name(#u_Request)

*
Define_Com Class(#XPRIM_Json) Name(#u_JsonRequest)
Define_Com Class(#XPRIM_Json) Name(#u_JsonResponse)
Define_Com Class(#XPRIM_JsonObject) Name(#u_JsonObject) Reference(*DYNAMIC)
* Log tijdelijk
Define_Com Class(#rpHttpLogging) Name(#RPHTTPLOGGING)
#RPHTTPLOGGING.mSetLogging( TRUE )
* make root of JSON document
#jsonObj <= #json.CreateRootObject
* add Bearer token
#u_Request.Options.AddBearerAuthorization( #u_Token )
#tokenval := #u_Token.AsNativeString
#jsonObj.Insertstring Key('aanvoerDatum') String(#aanvdatum)
#jsonObj.Insertstring Key('veilDatum') String(#veildatum)
#jsonObj.Insertstring Key('typeLadingDrager') String(#llm)

#jsonObj.SerializeToFile Path(#PATHNAMDOC)

#u_Request.Content.AddJson Value(#json)
#U_Request.DoPost( #HTTPpost )
Post Reply