× 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.



Hello  Rick,

There have been mentioned a few good approaches. Placing the XML document on 
the IFS is the shortest route. You can look at XML parsers in java, as there 
are tutorials with sample code at 
http://www-105.ibm.com/developerworks/education.nsf/dw/xml-onlinecourse-bytitle?OpenDocument&Count=500/

David mentioned the XML wrappers for RPG (download at IBM's AlphaWorks: 
http://www.alphaworks.ibm.com/tech/xml4rpg). But beware: documentation is 
hardly existant.

You can change the sample RPGDB2XML programme (hope it is the right name). This 
programme uses the uses the DOM interfaces to read an XML document from the IFS 
into a PF. You do not need the trouble with the vector handling in the sample. 
Using DOM the document is first parsed in memory into a tree structure, then a 
combination of parent element - child element is retrieved. As XML can have 
nesting, this process can be handled in a procedure, which can be called 
recursively, when the child element is in fact a parent element to other 
(child) elements.

Mapping the data to the file can be done, as it is shown in the sample 
programme, using embedded SQL. I personally prefer to place the retrieved data 
in an array element and output that to a flat file (one field); the array I 
defined has 32 entries with a length of 32, a length of 1024. Another programme 
can take that file and create the records in your database.

Conversion can bedone using the UniCode tables provided. The sample programme 
works fine without alteration to this part: I opened the XML document in 
Notepad and view the result of the parsing in my flatfile or the sample PF: no 
strange characters.

Regards.
Carel Teijgeler

======= At 2002-08-16, 09:04:00 you wrote: =======

>We just closed an agreement to receive an EDI - type transmission in which
>the data file will be sent and retrieved in XML format. Having virtualy no
>experience with XML, I have no idea about how or what software might:
>
>1. convert the file to a CSV or text - type format
>2. convert to EBCDIC and land it on the AS400
>
>Thanks much.
>
>Rick Rayburn
>
>
>_________________________________________________________________
>Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>_______________________________________________
>This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
>To post a message email: MIDRANGE-L@midrange.com
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
>or email: MIDRANGE-L-request@midrange.com
>Before posting, please take a moment to review the archives
>at http://archive.midrange.com/midrange-l.

= = = = = = = = = = = = = = = = = = = =







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.