I'm getting the following error after executing this code:
output = yajl_copyBufStr();
Automatic storage overflow.
Function check. MCH4429 unmonitored by OWSSRVPGM at statement 0000000638,
instruction X'0000'.
The output is defined as varchar(2000000);
I am getting valid JSON because I'm doing a YAJL_saveBuf and the IFS file is valid.
Error on yajl_copyBufStr
-
- Site Admin
- Posts: 674
- Joined: Sun Jul 04, 2021 5:12 am
Re: Error on yajl_copyBufStr
RPG has a limit of 16 mb total of automatic storage.
I want to emphasize, that's a TOTAL for all variables in automatic storage. So every variable in automatic storage must add up to < 16 MB of storage, or you will get an overflow.
You could potentially move some of the storage into heap storage or use teraspace.
I want to emphasize, that's a TOTAL for all variables in automatic storage. So every variable in automatic storage must add up to < 16 MB of storage, or you will get an overflow.
You could potentially move some of the storage into heap storage or use teraspace.
-
- Posts: 23
- Joined: Thu Mar 17, 2022 2:29 pm
Re: Error on yajl_copyBufStr
So I just decided to do a yajl_saveBuf. The system will be single threaded so there is no chance on other processes stomping on this. If I need to, I can always use a temp file.
Does yajl_saveBuf hold a lock on the IFS file? Here is the layout:
Program A calls a sub-procedure in a service program to build the JSON. That sub-procedure does the yajl_saveBuf();
Flow returns to program A, which is trying to do this:
http_req('POST':
url:
'/mwalter/result.json':
*omit:
'/mwalter/buffer.json':
*omit:
'application/json');
My partner is telling me that there is no Body. No JSON. Which is causing an error. I've tried http_stmf() as well. No joy there either. Could there be some sort of lock on the /mwalter/buffer.json file? I can look at the file and see the JSON.
We're working on trying to get Fiddler to intercept the request, but that's another bridge to jump off of.
THank you.
Does yajl_saveBuf hold a lock on the IFS file? Here is the layout:
Program A calls a sub-procedure in a service program to build the JSON. That sub-procedure does the yajl_saveBuf();
Flow returns to program A, which is trying to do this:
http_req('POST':
url:
'/mwalter/result.json':
*omit:
'/mwalter/buffer.json':
*omit:
'application/json');
My partner is telling me that there is no Body. No JSON. Which is causing an error. I've tried http_stmf() as well. No joy there either. Could there be some sort of lock on the /mwalter/buffer.json file? I can look at the file and see the JSON.
We're working on trying to get Fiddler to intercept the request, but that's another bridge to jump off of.
THank you.
-
- Site Admin
- Posts: 674
- Joined: Sun Jul 04, 2021 5:12 am
Re: Error on yajl_copyBufStr
No, there's no lock placed on it. It has a reference to it while yajl_saveBuf is active, but releases the reference at the end. But, I don't think that's what you mean by "lock" -- I suspect you're thinking of it like a PF rather than a STMF. That type of lock doesn't really exist on a STMF.
You are ignoring any errors, here. Not sure if that's intentional or not?imaxeman69 wrote: ↑Thu May 05, 2022 5:23 pm Here is the layout:
Program A calls a sub-procedure in a service program to build the JSON. That sub-procedure does the yajl_saveBuf();
Flow returns to program A, which is trying to do this:
http_req('POST':
url:
'/mwalter/result.json':
*omit:
'/mwalter/buffer.json':
*omit:
'application/json');
A lock doesn't make sense, here. Create a debug/trace file to see what's happening during the HTTP communications.imaxeman69 wrote: ↑Thu May 05, 2022 5:23 pm My partner is telling me that there is no Body. No JSON. Which is causing an error. I've tried http_stmf() as well. No joy there either. Could there be some sort of lock on the /mwalter/buffer.json file? I can look at the file and see the JSON.
Code: Select all
http_debug(*on: '/tmp/imaxeman69-trace.txt');
-
- Posts: 23
- Joined: Thu Mar 17, 2022 2:29 pm
Re: Error on yajl_copyBufStr
Thanks Scott.