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



The ILE COBOL route would be the best way to go if that's practical for you. 
Here's a less slick alternative.

It's possible for a COBOL program to write out lines of XML to a flat DB2 
database file, then use a CPYTOIMPF command to write the DB2 flat file to a 
stream file in the IFS. Each line of XML would be defined as a data structure 
in the working storage section. For example:

     01 XML-AMOUNT-DUE-LINE
         05 FILLER                                PIC X(11) VALUE "<AMOUNTDUE>".
         05 XML-AMOUNT-DUE-VALUE  PIC S9(11)V9(02).
         05 FILLER                                PIC X(12) VALUE 
"</AMOUNTDUE>".

Have the COBOL program fill in the amount due value, then write the 
XML-AMOUNT-DUE-LINE to the DB2 flat file. Do this same kind of thing for each 
line needed in the XML file. The DB2 flat file will contain the entire XML 
file, with each record in the DB2 file being one line in the XML file. The 
CPYTOIMPF command will transform the contents of the DB2 file into a regular 
XML file in the IFS. 

This is a bulky solution and does not let you take full advantage of iSeries 
XML solutions, but there it is.

Good luck,
Kelly

> -----Original Message-----
> From: cobol400-l-bounces@xxxxxxxxxxxx [SMTP:cobol400-l-bounces@xxxxxxxxxxxx] 
> On Behalf Of RogerBoyette@xxxxxx
> Sent: Friday, July 29, 2005 7:48 PM
> To:   COBOL Programming on the iSeries/AS400
> Subject:      RE: [COBOL400-L] Converting AS/400 files to XML?
> 
> Geir,
>  You can find XML statements in the ILE COBOL manual for v5r3. You can get to 
> an online printable (or viewable) version at the online website for IBM 
> manuals 
> (http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/index.htm.
>  I haven't had an opportunity to use this new feature but this is where I 
> would look first for COBOL.
>  I have downloaded some of the online printable manuals and stored them in 
> PDF format on my PC system for quick review. You might try downloading the 
> ILE COBOL Reference and Programming Guide manuals. 
>      Hope this helps,
>      Roger
>  
> 
> geir.kildal@xxxxxxxxxxxxxxx wrote:
> 
> >Hello.
> >
> >I have been asked if I can deliver invoice-information on XML-format from 
> >an AS/400 COBOL-application.  Does anyone of you know the best way of 
> >doing this?
> >
> >I'll make a flat file on the AS/400 containing the information needed, but 
> >how do I transform it into XML?
> >
> >
> >
> >Mvh.
> >
> >Geir Kildal
> >TietoEnator AS
> >Tlf . . : (+47) 611 73805
> >Mob. : (+47) 90 10 13 16
> >eMail: geir.kildal@xxxxxxxxxxxxxxx
> >_______________________________________________
> >This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
> >To post a message email: COBOL400-L@xxxxxxxxxxxx
> >To subscribe, unsubscribe, or change list options,
> >visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
> >or email: COBOL400-L-request@xxxxxxxxxxxx
> >Before posting, please take a moment to review the archives
> >at http://archive.midrange.com/cobol400-l.
> >
> >
> _______________________________________________
> This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
> To post a message email: COBOL400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
> or email: COBOL400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/cobol400-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.