Glad to hear you have it working. For the path option the following works. Note the use of the element count from the psds. RPG populates this when you are parsing into an array as there is no opportunity to add a countprefix field.
dcl-ds pgmStat psds;
elements int(20) pos(372);
end-ds;
Dcl-ds ...
Search found 246 matches
- Tue Jun 10, 2025 10:32 am
- Forum: YAJL-ILE
- Topic: YAJLINTO handling varying number of array records
- Replies: 8
- Views: 11107
- Thu Jun 05, 2025 7:14 pm
- Forum: YAJL-ILE
- Topic: YAJLINTO handling varying number of array records
- Replies: 8
- Views: 11107
Re: YAJLINTO handling varying number of array records
Look into the countprefix option. That is what you need to use to get a count of the actual number. Can’t type code on my phone or I’d try to give you an example.
If you really only want that data you should also look at using the path option to direct the parse to the bit though want.
If you really only want that data you should also look at using the path option to direct the parse to the bit though want.
- Tue Apr 29, 2025 4:16 pm
- Forum: HSSFR4
- Topic: Very slow (? hang ?) on SS_SAVE
- Replies: 2
- Views: 10552
Re: Very slow (? hang ?) on SS_SAVE
I have no clue as to a direct answer to your problem - but I can't help but wonder if there is not a better approach. Frankly I'm amazed that the process didn't just blow up at some point.
A multi-million-row spreadsheet seems insane - nobody can usefully work with that.
Can it not be grouped to ...
A multi-million-row spreadsheet seems insane - nobody can usefully work with that.
Can it not be grouped to ...
- Thu Apr 24, 2025 5:48 pm
- Forum: YAJL-ILE
- Topic: Trouble reading in an array
- Replies: 1
- Views: 4492
Re: Trouble reading in an array
Been a long time since I used the "raw" YAJL APIs. I tend to use DATA-INTO with YAJLINTO for most stuff.
That said - I seem to recall that YAJL_object_find will only locate children of the passed node. So you would need to first locate the "data" node and then from there locate the child "jobs ...
That said - I seem to recall that YAJL_object_find will only locate children of the passed node. So you would need to first locate the "data" node and then from there locate the child "jobs ...
- Sun Apr 20, 2025 7:41 pm
- Forum: YAJL-ILE
- Topic: Read Payload from IFS File to a string in RPGLE
- Replies: 5
- Views: 9164
Re: Read Payload from IFS File to a string in RPGLE
I know you have been working on an alternative approach - although how SQL helped I'm not sure - but as far as I can see your second approach works just fine.
ctl-opt BNDDIR('YAJL')
OPTION(*SRCSTMT:*NODEBUGIO: *NOSHOWCPY);
/copy yajl/qrpglesrc,yajl_h
Dcl-S docNode like(yajl_val);
Dcl-S node ...
ctl-opt BNDDIR('YAJL')
OPTION(*SRCSTMT:*NODEBUGIO: *NOSHOWCPY);
/copy yajl/qrpglesrc,yajl_h
Dcl-S docNode like(yajl_val);
Dcl-S node ...
- Tue Apr 15, 2025 3:09 pm
- Forum: YAJL-ILE
- Topic: yajl_stmf_load_tree returning open and file name conversion error
- Replies: 1
- Views: 6240
Re: yajl_stmf_load_tree returning open and file name conversion error
CCSID 65533? That's pretty unusual - in fact I don't think I've ever seen it before. According to IBM it is only for user-definable code sets. Which would indicate that the company is using their own conversion tables. Which might help explain this.
As to DATA-INTO, simply point Scott's YAJLGENR4 ...
As to DATA-INTO, simply point Scott's YAJLGENR4 ...
- Thu Apr 10, 2025 4:32 pm
- Forum: HTTPAPI
- Topic: Getting error: SetError() #22: open(): No such path or directory.
- Replies: 2
- Views: 13348
Re: Getting error: SetError() #22: open(): No such path or directory.
It looks to me as if you are mixing up your APIs.
The second parm for http_get is the filename where you want the retrieved response placed. So hardly any wonder that you are being told the file doesn't exist because assumedly it is all blanks.
Maybe you need http_req?
The second parm for http_get is the filename where you want the retrieved response placed. So hardly any wonder that you are being told the file doesn't exist because assumedly it is all blanks.
Maybe you need http_req?
- Tue Mar 25, 2025 4:02 pm
- Forum: RPG IV
- Topic: XML-SAX failed with error code 6
- Replies: 3
- Views: 61540
Re: XML-SAX failed with error code 6
If you mean has anything changed with XML-SAX that would help with this the answer is no - nothing I can think of.
Only thing I can think of is to do a scan/replace operation. But that will take time so If the failure is infrequent, better to trap the error and run the scan/replace before a retry.
Only thing I can think of is to do a scan/replace operation. But that will take time so If the failure is infrequent, better to trap the error and run the scan/replace before a retry.
- Thu Mar 20, 2025 4:09 pm
- Forum: General
- Topic: retrive qtemp files from a batch job ?
- Replies: 2
- Views: 27974
Re: retrive qtemp files from a batch job ?
Are you the person who posted this on FB? I answered it there.
And you’re being rather impatient - bouncing the question after 3 minutes is a bit fast!
And you’re being rather impatient - bouncing the question after 3 minutes is a bit fast!
- Mon Mar 17, 2025 8:20 pm
- Forum: RPG IV
- Topic: BASE64 Decode and Blanks
- Replies: 2
- Views: 22548
Re: BASE64 Decode and Blanks
Looks to me as if
Should be
Without that you are writing the varlen's length as part of the data and it is probably translating as blanks.
P.S. Why are you bothering to code CallP? It is not needed.
Code: Select all
callp write(fd: %addr(pdfout): PDFLEN);
Code: Select all
callp write(fd: %addr( pdfout : *Data ): PDFLEN);
P.S. Why are you bothering to code CallP? It is not needed.