×
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 May 6, 2011, at 11:44 AM, rpg400-l-request@xxxxxxxxxxxx wrote:
This is more for my information that anything else. Because I am at V6R1 I
could declare a huge variable and do an XM-INTO to extract it. My
understanding was that the handler would break it down into smaller pieces
but it didn't do it.
Using XML-INTO with a handler does not change the RPG data definition requirements. You still define everything the same way as you would if you weren't using a handler. For example if the XML looks like this:
<Customers>
<RecordCount> 6 </RecordCount>
<Company>Phones R Us</Company>
<Company>Suchadeal Bank</Company>
<Company>Rinky Dinky Toy Co.</Company>
<Company>Partner400</Company>
<Company>BlackHole Navigation</Company>
<Company>Banker's Trust</Company>
</Customers>
Then the basic XML-INTO would be:
d extractedData DS
d company 32a Dim(99)
/Free
XML-INTO company
%XML(XML_Input1: 'case=any' );
If using handler it would look like this: (handling in 4 "unit" chunks)
d HandleCompany pr 10i 0
d commArea 10i 0
d company 32a Dim(4) Const
d numElements 10i 0 Value
XML-INTO %Handler( HandleCompany: commArea )
%XML(XML_Data : 'path=Customers/Company case=any' );
The handler will not break the document up into arbitrary pieces - it has to break it up into a number of repeated elements.
Jon Paris
As an Amazon Associate we earn from qualifying purchases.