× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thank you very much... didn't realize it was the same as XML-INTO

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Barbara Morris
Sent: Wednesday, January 27, 2021 6:39 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: JSON Data structure

On 2021-01-27 5:14 p.m., Greg Wilburn wrote:
...
data-into jsonDoc %DATA( ifsPathname
: 'doc=file case=convert countprefix=num_')
%PARSER( 'YAJLINTO'
: '{ "document_name": "jsonDoc", +
"number_prefix": "YAJL_" }');

...

I would like to do
For x = 1 to num_jsonDoc;
Instead of
For x = 1 to %elem(jsonDoc);
...

Greg, when the target field for XML-INTO or DATA-INTO is an array, you
can get the number of elements set by the opcode from the int(20)
subfield at position 372 of the PSDS. The doc calls this subfield
"Elements set by XML-INTO or DATA-INTO".
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzasd/psdsdt9.htm

dcl-ds pgmStat psds;
elements_set int(20) pos(372);
end-ds;


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.