On 1/26/2012 11:08 AM, MRiggins@xxxxxxxxxxxx wrote:

There are no parsing errors received using the %HANDLER. I do convert the
XML CCSID to 1208 before running the program. If someone would be able to
take a look and see what error I am making it would be greatly
appreciated. I have included the basic program and the XML example.

When you use %HANDLER, you get the data within the handler procedure not in a data structure. The "path" option refers to the path within the XML document to get to the repeating data that you want. Most likely you'd code 'path=PO/ChangePODetail'. You'd code your handler procedure to expect an array of LIKEDS(ChangePODetail).

I think these are the changes you need to get started.

XML-INTO %HANDLER(ProcessPO : PCount)
chg %XML(xmlfile : 'path=PO/POChanges case=any +
allowmissing=yes allowextra=yes +
doc=file');


* Handler Routine
p ProcessPO b
D PI 10i 0
D POCount 10i 0
chg D POds likeds(ChangePODetail)
D dim(2) Const
D elements 10i 0 value

D i s 10i 0

/FREE
for i to %elem(POds);
//do something;
endfor;
Return 0;
/end-free
p E


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.