Search found 14 matches

by brianjgarland
Wed Mar 08, 2023 10:30 pm
Forum: YAJL-ILE
Topic: DATA-INTO when entire JSON Document is an array
Replies: 5
Views: 7662

Re: DATA-INTO when entire JSON Document is an array

If in the future you need rel, you can just define it using dcl-subf inside your DS.
by brianjgarland
Fri Sep 23, 2022 10:30 am
Forum: HTTPAPI
Topic: WRITE JSON with EMBEDDED SQL in SQLRPGLE program
Replies: 3
Views: 5397

Re: WRITE JSON with EMBEDDED SQL in SQLRPGLE program

Hello,

You need to add DECEDIT(0,) to your H-spec or CTL-OPT statement.

https://www.ibm.com/docs/en/i/7.3?topic ... brun-value

Brian
by brianjgarland
Thu Mar 03, 2022 6:10 pm
Forum: HSSFR4
Topic: XLPARSER4 not "seeing" some cells
Replies: 1
Views: 8833

Re: XLPARSER4 not "seeing" some cells

For completeness: It turned out the person creating the sheet had to make a change to how they were creating the sheet as they were doing something wrong.
by brianjgarland
Thu Feb 24, 2022 7:37 pm
Forum: YAJL-ILE
Topic: Modify existing JSON
Replies: 3
Views: 2121

Re: Modify existing JSON

I don't have the full definition of the JSON so DATA-INTO is a problem.

I'm sure I can get the definition so that might be worth a try.

Thank you for the suggestion.
by brianjgarland
Thu Feb 24, 2022 4:15 pm
Forum: YAJL-ILE
Topic: Modify existing JSON
Replies: 3
Views: 2121

Modify existing JSON

I have a task where I need to read a database file that has a column that contains a JSON string. I will then execute code based on the value of a key in that string and then modify the value for that key and update the table. All that is pretty straightforward except for "modify the value for ...
by brianjgarland
Tue Feb 15, 2022 12:30 pm
Forum: YAJL-ILE
Topic: Remove unwanted \ and \n in the JSON
Replies: 7
Views: 3372

Re: Remove unwanted \ and \n in the JSON

On yajl_genOpen that first parameter is whether or not to make the JSON "pretty". If you pass *OFF instead of *ON it will drop all the line feeds (\n) from the string. You don't show how you added "OUT_JSON" to the JSON object in your code example but it looks like that may be wh...
by brianjgarland
Mon Feb 14, 2022 3:40 pm
Forum: YAJL-ILE
Topic: Remove unwanted \ and \n in the JSON
Replies: 7
Views: 3372

Re: Remove unwanted \ and \n in the JSON

The slash indicates an escape character. My guess is you added a string containing the { and what follows instead of adding those elements individually.

Can you share some code? Both how you build the JSON object and how you extract it into a string. That may help us determine what is happening.
by brianjgarland
Tue Feb 08, 2022 5:49 pm
Forum: RPG IV
Topic: Array has too many omitted index - Compile Time Error
Replies: 2
Views: 4241

Re: Array has too many omitted index - Compile Time Error

ArrData is an array you cannot do "dsply arrdata;"

You could do something like this:

Code: Select all

        FOR i = 1 TO %ELEM(arrdata);      
            dsply arrdata(i);             
        ENDFOR;                           
by brianjgarland
Fri Jan 28, 2022 1:16 pm
Forum: HSSFR4
Topic: XLPARSER4 not "seeing" some cells
Replies: 1
Views: 8833

XLPARSER4 not "seeing" some cells

I'm trying to parse an XLSX file that was generated by another system (not IBM i) using Apache POI XSSF routines (I'm not sure which version of POI they are using). When parsing I only get calls to my numeric cell call-back routine. All string cells are ignored. The sheet opens fine in Excel and Goo...
by brianjgarland
Mon Nov 01, 2021 6:12 pm
Forum: HTTPAPI
Topic: Upgrading from V7R1 to V7R3 - HTTPAPI Compatibility?
Replies: 4
Views: 11223

Re: Upgrading from V7R1 to V7R3 - HTTPAPI Compatibility?

All of Scott's utilities are at scottklement.com

You can get HTTP API at scottklement.com/httpapi/