×
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.
On 2019-03-14 1:02 PM, Stephen Coyle wrote:
I agree...I think the XML is missing <Order> and </Order> tags as well.
I just wanted to be sure there was no way to define the DS to handle this
type of structure before I go back to the supplier of the XML and tell them
they need to add tags to group each order.
As long as there are <Order>, <Brand>, and <Division> tags for every
order, I think you just need to define those RPG subfields as arrays
too. For each order, you'll just refer to the same element of each of
the arrays.
And you'll need a count for all the arrays in the RPG data structure.
Then it looks like you can get rid of both allowextra and allowmissing.
Dcl-DS OrderInformation;
countOrder int(10);
OrderID varchar(50) dim(100);
countBrand int(10);
Brand varchar(50) dim(100);
countDivision int(10);
Division varchar(50) dim(100);
countInvoiceOrderIte int(10);
Dcl-DS InvoiceOrderItems dim(100);
countItem int(10);
Dcl-DS Item Dim(10);
ItemShipDate varchar(50) ;
Carrier varchar(50) ;
End-DS ;
End-DS ;
End-DS ;
Me, when I'm developing a new XML-INTO, I always start without
allowextra or allowmissing. In my sample XML, I start with only what I'm
interested in. That makes it a bit easier to see what's going wrong.
Then, when I have it working, I add back allowextra, and very
occasionally allowmissing, if I need them, and then I add some XML test
files to test the "allows".
As an Amazon Associate we earn from qualifying purchases.