× 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'm trying to use XML-into opcode on V5R4 machine and having a hard time in
>> getting data in the data structure. Could anyone please shed some light on
>> the issue? The xml-into works fine upto " freightbillcommodities.
>> Freightbillcommodity" array but can't get remaining errors
>> information in the data structure.


The only real changes I made to your code were to remove the Dim from freightbillcommodity - from the document you sent it is not repeating - but I don't see that that was the problem. The RPG code you posted did an XML-INTO freightbill - but I can't see any definition for that so I have to assume the source you sent was incomplete because as-is it won't compile.

I added the definition for freightbill based on what I found in the XML (guessing the field sizes) and changed the XML-INTO to reference a file - you were referencing a variable - which again was not shown in the sample you supplied - so it is possible that there was an error in the XML that caused the problems - I can't tell.

Anyway - this version works and I can see the content of all data elements in debug.

D freightbill Ds Qualified
D id 1a
D Clientcode 20a
D carriercode 20a
D freightbillcommodities...
D LikeDS(freightbillcommodities_t)

D freightbillcommodities_t...
D Ds Qualified

D freightbillcommodity...
D likeds(FrBlComm_t) dim(2)

D FrBlComm_t Ds Qualified
D id 5
D LineNumber 5
D Description 50
D Code 5
D Commodityid 5
D FBClass 5
D Weight 5
D Pieces 5

// D UIErrorsColl likeds(FrBlUIerr_t) dim(2)
D UIErrorsColl likeds(FrBlUIerr_t)

D FrBlUIerr_t Ds Qualified
D CtlError Likeds(FrBiErrd) dim(2)

D FrBiErrd Ds Qualified
D ErrorCode 5
D Source 5
D ErrorMessage 15
D ExtraMessage 15
D Fatal 5
/free

xml-into freightbill
%XML('/Partner400/xmldata.xml' : 'case=any allowextra=yes +
allowmissing=yes');

Jon Paris

www.Partner400.com
www.SystemiDeveloper.com




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.