On 4/21/2012 6:18 AM, Klugman, Luke wrote:
d notification ds QUALIFIED
d peanut likeds(peanutds)

xml-into notification %XML(xmlDocument :
'doc=file +
trim=all +
countprefix=count +
allowmissing=yes +
Now it appears that because the<peanut> element is missing, the
XML-INTO maybe realises that
there will obviously be no instance of babyNut, but does not set the
countbabyNut to 0, but leaves it blank, and as I am using a 5i 0 field,
this becomes 16448.

I think you also need a counter subfield for notification.peanut too. Ideally, you would have a counter subfield for everything that could be optional, and then get rid of allowmissing=yes. A bit more work to set it up, but I think it's much more reliable.

d notification ds QUALIFIED
d peanut likeds(peanutds)
d countpeanut 10i 0

if notification.countpeanut > 0;
for i = 1 to notification.peanut.countbabyNut;

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 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].