xml handling on AS400

70 pts.
Tags:
AS/400
BizTalk
XML
I'm trying this for the first time.

1. BizTalk server will send an XML to AS400

2. On AS400 I have to write something which will read this xml and extract the necessary fields passed in it.

I'm not sure what is the fastest, easiest way to do this.

First of all how xml is stored on AS400, is it a flat file? Does AS400 treat it as a text.

Can I write RPG program to parse this text using scan operation?



Software/Hardware used:
AS400
ASKED: May 19, 2010  4:57 AM
UPDATED: May 21, 2010  9:16 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    The "fastest, easiest" way is probably not the way to do it. Do it the "right" way instead. XML is stored in whatever way you choose to store it. Asking how it's stored is like asking how a programmer's name is stored. It could be stored in a data area or in a column in a table or in a user space or as a constant in a program or... XML should be stored as an XML file, or, if you have the DB2 XML Extender product, as part of a DB2 table. What version of i5/OS do you have? What DB2 options are available for you? Are you restricted to RPG programming or would you be comfortable with some COBOL or Java? Tom
    125,585 pointsBadges:
    report
  • as400dev
    Tom, I would like to know how this can be done using RPG/ILE RPG. It would be helpfull for my understanding Thanks
    475 pointsBadges:
    report
  • YuVa47
    Hi, Please do check out this http://www.scottklement.com/expat/ and you will be able to do what you want with XML YuVa47
    1,285 pointsBadges:
    report
  • TomLiotta
    I would like to know how this can be done using RPG/ILE RPG. It would be helpfull for my understanding Yes, but a decent answer requires knowing what version/release of i5/OS you are running. Also, if you have the DB2 Extender product installed, you might store and handle XML very differently than if you don't. And if you have the XML Toolkit installed, some coding will be easier than if you don't. COBOL had some native XML support built into the compiler before RPG did. You asked for "easiest, fastest", and COBOL could be easier and faster depending on what you have available. Use GO LICPGM and take option 10=Display installed licensed programs. Scan down the list to see if anything references XML, and report results. YuVa47 suggested Scott Klement's Xpat tool, and it's an excellent tool to have available. Whether it works for you or not, or whether you're allowed to use it or not, knowing what you have in your system will be necessary. Tom
    125,585 pointsBadges:
    report
  • Sloopy
    I use EXPAT, and find it easy to use. I have sample programs in RPG showing the processes involved. Unless you are just dumping incoming XML into a flat file, or using the DB2 XML extensions (which will still require some programming), you will either have to use a mapping tool, which is expensive, or write your own code. EXPAT does make things a lot simpler than using the built-in XML functions in RPG - although I can't comment about COBOL. The 'right' way, as Tom would say, is to receive the incoming XML and store it in the database you have. If it is not an XML database, there is no point in creating an XML database just to store your XML data. You work with what you have, which for most companies with iSeries is a relational database. EXPAT (and other products) gives you the tools to do that. If you want some sample code, let me know. I'm on john.blenkinsop@ne.nykline.com Sloopy
    2,195 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following