Page 2 of 2

Re: API call with Headers

Posted: Thu Jul 18, 2024 2:23 pm
by RINALDI_V
Thanks. I probably created a problem that doesn't exist, because it works anyway!

But now I have another problem.
The attachment JSON_RIC_IVA.pdf is no longer available
This is a JSON response that I convert in DS whith YAJLGEN (Result_YAJLGEN)

JSON_RIC_IVA.pdf
(134.43 KiB) Downloaded 1667 times
and in my rpg this is DATA-INTO:

Code: Select all

         YAJLOPTS='{"number_prefix": "YAJL_"}';

        DATA-INTO Dsjson %DATA( response
                              : 'case=convert +
                                 allowextra=yes +
                                 allowmissing=yes +
                                 countprefix=num_')
                           %PARSER('YAJLINTO': YAJLOPTS);

Re: API call with Headers

Posted: Thu Jul 18, 2024 2:26 pm
by RINALDI_V
I get this error

Image

But the DS is perfect up to Data 6; from the next record, the DS are empty.

Image



What can I check?

Re: API call with Headers

Posted: Thu Jul 18, 2024 4:08 pm
by Scott Klement
Move the cursor to the error message and press F1 to get more details about what the error is.

Most likely it's mapping data to the DS until it gets the error, then stops -- so you have only a partial one filled in.

Re: API call with Headers

Posted: Fri Jul 19, 2024 10:28 am
by RINALDI_V
Scott Klement wrote: Thu Jul 18, 2024 4:08 pm Move the cursor to the error message and press F1 to get more details about what the error is.

Most likely it's mapping data to the DS until it gets the error, then stops -- so you have only a partial one filled in.
Sure, this is clear, but I don’t know what else to check to understand the problem.

Image

Re: API call with Headers

Posted: Mon Jul 22, 2024 3:46 pm
by Scott Klement
I don't speak Italian. What does the message say?