Page 1 of 1
LANSA JSON Writer issues on iSeries - SOLVED
Posted: Thu Apr 04, 2024 3:54 am
by René Houba
Hi,
Is someone familiar with this error??
We get an error when we create JSON on an iSeries (where on other iSeries machines we do not get this error).
The problem iSeries has LANSA V15 with EPC150050 with OS/400 7.5.
So to isolate the problem, we created a little test program (is included and can be tested if you want).
The error we get on the problem machine is:

- JSON error (1).JPG (20.81 KiB) Viewed 75028 times
When we test our test solution in Windows: no problem at all.
We tested today as well, on 3 different iSeries environments:
LANSA V15 with EPC150040 with OS/400 7.5: no problem at all.
LANSA V15 with EPC150050 with OS/400 7.4: no problem at all.
LANSA V15 with EPC150060 with OS/400 7.4: no problem at all.
The attached ZIP file contains a Reusable Part (jrJsonWroter) a process (JRJSONTEST) and a function (Json2).
You can import these into VL and check them in into the iSeries.
Start the process and start the function:

- JSON error (2).JPG (8.98 KiB) Viewed 75028 times
Does anyone get the same error?
The function runs OK when you do not get a message.
Kind regards,
René
Re: LANSA JSON Writer issues on iSeries
Posted: Thu Apr 04, 2024 12:00 pm
by Dino
Hi Rene
Can't test right now as i don't have v7r5 with that epc level, but wondering how that LANSA installation that fails arrived to that version, like multiple upgrades, etc.
To discard a problem related with that I used to install a parallel copy of lansa in the same machine to check if the problem remain.
Re: LANSA JSON Writer issues on iSeries
Posted: Thu Apr 04, 2024 12:44 pm
by bark
Given the various tests that were done on other environments, I would be looking more at the LANSA side of things. Also, I downloaded and tested it OK and even on a 7.2 O/S environment.
As Dino suggested, perhaps there is a LANSA object that isn't the correct version (locked during an upgrade or when applying an EPC?) or corrupted. You would need LANSAs help with sorting that out.
Re: LANSA JSON Writer issues on iSeries
Posted: Thu Apr 04, 2024 5:05 pm
by René Houba
Hi Bark and Dino,
Thanks for your replies.
This is a fresh LANSA V15 install, however, the first install failed due too tight iSeries password control. So I had to delete all related to the incorrect install, and did a re-install (that finished OK).
Weird is that we already used the XPRIM JSON without any problem, but that seems to be too slow on iSeries and therefor we now use the other JSON Writer.
Re: LANSA JSON Writer issues on iSeries
Posted: Thu Apr 04, 2024 5:22 pm
by René Houba
Hi Bark,
Question: What LANSA version is related to your OS/400 7.2 release?
Re: LANSA JSON Writer issues on iSeries
Posted: Fri Apr 05, 2024 5:53 pm
by René Houba
We activated on the iSeries the test application with trace:
LANSA REQUEST(X_RUN) PROCESS(JRJSONTEST) FUNCTION(JRJS2) PARTITION(SUP) X_RUNADPRM('ITRO=Y')
The trace file will end up in /lansa_<pgmlib>/x_lansa/tmp/x_trace001.txt
In there I see errors related to x_fun2.c

- TRACE (1).JPG (183.21 KiB) Viewed 74668 times
I have send the trace to Support
Re: LANSA JSON Writer issues on iSeries
Posted: Mon Apr 08, 2024 11:22 am
by atostaine
Is you're library list resolving to a different lansa install?
LANSA JSON Writer issues on iSeries - SOLVED
Posted: Wed Apr 10, 2024 12:01 am
by René Houba
This problem is solved.
The x_fun2.c on the iSeries is bundled in the SVRPGM X_FUN. Checking this object, we saw that it had the version of the LANSA install, and NOT the version related to the installed EPC's.
We re-applied EPC150050 again (via QSECOFR) and even then, the X_FUN object was not related to EPC150050.
Via DSPJOBLOG OUPPUT(*PRINT) we saw the problem in the joblog.
In the joblog we saw references to another ASP group.
For example: the install was done in ASP group X, but the joblog referenced to ASP group Z.
So we checked the job description of QSECOFR and there we saw that the Initial ASP group was set to Z.
We changed the job description to Initial ASP group *NONE and applied EPC150050 again.
Now the objects that failed in our JSON tests were related to the correct EPC level now and this solved this issue.
I did many many installs/updates etc. but this problem was new to me
