800 pts.
0
Q:
Transform DB2 to XML from AS/400
I have been requested to create XML files from AS/400 DB2 files to be used to update data on a client's web server. I have looked at IBM's XML Toolkit for iSeries, but the examples are all about parsing XML input and nothing about creating XML from native AS/400 database files. Is there something in the Toolkit that will do this? Does anyone have any experience with DB2 to XML? Thanks.
ASKED: May 10 2009  3:36 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
210 pts.
0
A:
 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0
  • AddThis Social Bookmark Button
I have written programs to do what you want to do, and would be happy to provide an example, for you and anyone else who is interested.

You can get me at john.blenkinsop@ne.nykline.com

Sloopy

--------------

DB2 SQL has the capability of creating XML ...

SELECT XML2CLOB(
XMLELEMENT(NAME "DEPARTMENT",
XMLATTRIBUTES (DEPT AS "NAME" ),
XMLAGG(XMLELEMENT(NAME "EMP",
XMLELEMENT(NAME "FIRSTNAME", FNM),
XMLELEMENT(NAME "LASTNAME", LNM) )
ORDER BY LNM )
) ) AS "DEPT_LIST"
FROM TTEST
GROUP BY DEPT;

results in

<DEPARTMENT NAME="BADM "><EMP><FIRSTNAME>CHERYL </FIRSTNAME><LASTNAME>ST......

Happy DB2ing

-------------------------------------------------------------
Er... I do not know who wrote the piece above, regarding SQL generating XML. It was not me. I do have the feeling that it is not available in OS version 5 or below. Probably 6.1.

Sloopy.


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

I can highly recommend the program from Sloopy. Its very well written and works after you made your changes according to your needs.

YuVa
Last Answered: Oct 20 2009  3:40 PM GMT by YuVa47   210 pts.
Latest Contributors: Sloopy   1930 pts., Meandyou   1795 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

BigKat   2480 pts.  |   Aug 6 2009  1:47PM GMT

Is the XML2CLOb from i6.1? I had never heard of this, and tried it on a V5R4 and it doesn’t seem to work

Token “VENDOR” was not valid. Valid tokens: ) ,.

 
0