|
Easier said than done Mark.
COBOL has an XML generation capability built in - but most of the time you
still need to transform it before it can be used.
For example - given a DS like this:
dcl-ds accounts;
dcl-ds account dim(99);
Id char(6);
name char(30);
end-ds;
end-ds;
Should that result in:
<accounts>
<account>
<id>xxxxxx</id>
<name>name stuff</name>
</accoun>
<account>
<id>yyyyyy</id>
<name>name stuff</name>
</accoun>
....
</accounts>
Or
<accounts>
<account "id=xxxxxx">
<name>name stuff</name>
</accoun>
<account "id=yyyyyy">
<name>name stuff</name>
</accoun>
....
</accounts>
And that is just a trivial example. I suspect for JSON it would be even
worse as the rules are not as strict as for XML and people do really
strange things.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
On Mar 19, 2018, at 9:22 AM, Mark Murphy <jmarkmurphy@xxxxxxxxx> wrote:wrote:
Great, now all we need to complete that picture is a DATA-FROM (and maybe
even an XML-FROM) to make it simple to produce JSON or whatever data
interchange format from a data structure.
On Fri, Mar 16, 2018 at 4:55 PM, Barbara Morris <bmorris@xxxxxxxxxx>
such
On 2018-03-16 11:35 AM, Barbara Morris wrote:
The latest enhancement for RPG is available for 7.2 and 7.3: The
DATA-INTO opcode. It's like XML-INTO, but for any structured language,
haveas JSON. The big difference between DATA-INTO and XML-INTO is that you
mailing list--to supply the parser for the structured language.
Here's a article by Jon Paris about DATA-INTO:
http://ibmsystemsmag.com/ibmi/developer/rpg/rpg-data-into/
--
Barbara
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
To post a message email: RPG400-L@xxxxxxxxxxxxquestions.
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
link: http://amzn.to/2dEadiD
Help support midrange.com by shopping at amazon.com with our affiliate
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.