× 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.








I finally got a sample test file and can see the data.
The arrangement is
..
<order-header>
          <head_ordernum>1315224</head_ordernum>
          <head_customer>1055125</head_customer>
           ..more
</order-header>
<customer>
          <customer_name>APPLE ORCHARDS</customer_name>
            ..more
</customer>
<order-detail>
           <detail_part>P1502-666</detail_part>
           .. more
</order-detail>
10 more files..
then starts next order

<order-header>
          <head_ordernum>1205666</head_ordernum>
          <head_customer>1055125</head_customer>
           ..more
</order-header>
<customer>
          <customer_name>CHERRY ORCHARDS</customer_name>
            ..more
</customer>
<order-detail>
           <detail_part>P1502-777</detail_part>
           .. more
</order-detail>
10 more files..
 
It's 12 years of orders and we are trying to get it broken into 1 file per year rather than
all recs in 1 file.
 
Jim


--- On Fri, 7/27/12, Barbara Morris <bmorris@xxxxxxxxxx> wrote:


From: Barbara Morris <bmorris@xxxxxxxxxx>
Subject: Re: current state of xml-into v6r1
To: rpg400-l@xxxxxxxxxxxx
Date: Friday, July 27, 2012, 8:25 PM


On 2012/7/27 1:11 PM, James Franz wrote:
I am reviewing options for a project where will receive an export file from a non-i system, in xml, ftp'd to us, with a dozen tables in the single xml (order header,vendor, customer, order detail, etc, ... next order header...) where there will be perhaps half million orders. We have specs only, no file yet. The dtd seems straight forward, plus a separate excel of each column definition.
Before we head down the xml-into route, is there any limits for processing a file of millions of records? No single column will exceed perhaps 1000 bytes.
We have no xml tools (and no budget for this import).
We do have the recent v6r1 namespace ptfs.

For sure with millions of records, you'd need to use the %HANDLER form
of XML-INTO, where your handler procedure would handle X records at a time.

But you might not be able to use XML-INTO for that particular XML
document anyway.

If the order-details are nested within the order-header, like this,
    <order-header>
          <order-detail ... />
          <order-detail ... />
          <order-detail ... />
    </order-header>
then XML-INTO would work with a %HANDLER as long as you could fit the
contents of the order-header + all its order-details in one RPG data
structure (max size 16MB). You would define an RPG data structure
"header" with subfields for the vendor, customer, and an array for all
the detail. Then you would define your handler to receive an array of
header structures, maybe only DIM(1), depending on the size of the
header structure. Your handler would get called over and over with a few
header structures at a time.

But if the order-details are at the same level in the XML as the
order-header,
    <order-header ... />
    <order-detail ... />
    <order-detail ... />
    <order-header ... />
    etc
then XML-INTO would be very difficult to use because you could only get
either the order-detail or the order-header in any one XML-INTO. In that
case, XML-SAX or any other SAX-type XML parser would be easier/better.




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.