|
On Aug 28, 2018, at 9:02 AM, Justin Taylor <JUSTIN@xxxxxxxxxxxxx> wrote:
Just adding "allowmissing=yes" didn't help, the DS was still empty. I decided to pare things back and get at least something to work. I started pulling just the ID value from a single tag. I got that working and just expanded it. The final solution was to add another dimension to my DS. That worked and allowed me to load the whole thing with a single XML-INTO rather than five. Unfortunately, the single XML-INTO takes 50% longer than the five previously used (combined), and it now only works with "allowmissing=yes" (not sure why, since it's loading all the fields).
Working data structure:
Dcl-ds gOutputDs qualified inz ;
Dcl-ds Products ;
Products likeDs() dim() ;
End-ds ;
Dcl-ds Stages ;
Stages likeDs() dim() ;
End-ds ;
Dcl-ds productsToLoad ;
productsToLoad likeDs() dim() ;
End-ds ;
Dcl-ds loadedContainers ;
loadedContainers likeDs() dim() ;
End-ds ;
Dcl-ds unloadedProducts ;
unloadedProducts likeDs() dim();
End-ds ;
End-ds;
Thank you
-----Original Message-----
From: Jon Paris [mailto:jon.paris@xxxxxxxxxxxxxx]
Sent: Monday, August 27, 2018 12:56 PM
To: Rpg400 Rpg400-L <rpg400-l@xxxxxxxxxxxx>
Subject: Re: XML-INTO & path
OK - temporarily add allowmissing=yes to the options and see if that fixes it and you get data into the structures.
If it does then the real fix is to add the option countprefix=xxxxx ( xxxxx = your choice of name - I use count_ ) and then add the count fields to the DS. Like so:
count_Products int(5);
Products likeDs() dim() ;
count_Stages int(5);
Stages likeDs() dim() ;
etc.
See this article if you want to understand more about the option and why it is needed. https://www.itjungle.com/2015/08/18/fhg081815-story01/ <https://www.itjungle.com/2015/08/18/fhg081815-story01/>
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
--
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-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.