MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Generating XML files from DB2 query

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
magesh_rathnam
Beginner


Joined: 29 May 2004
Posts: 5
Topics: 4
Location: Chennai

PostPosted: Sun Oct 02, 2005 12:31 am    Post subject: Generating XML files from DB2 query Reply with quote

Hi all,



I want to export data from a table(selecting few columns) into a XML file. We can export data from a table into a text file with help of query like



EXPORT TO q_catlg.txt OF DEL
MODIFIED BY coldel^ chardel"" decpt. decplusblank datesiso
MESSAGES q_cat_dim.log
select * from
from <table name> tb
where tb.key = <key-value>
FOR READ ONLY;




But I want to generate a xml file containing the data from the select query. When I change the extn of the file in the query above from q_catlg.txt to q_catlg.xml, it creates a file with the same contents of the .txt file but with a extn .xml. It is not a valid xml file. Is it possible to generate a xml file from a DB2 query. Can someone help me on this.



Regards,

Magesh.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Oct 03, 2005 8:14 am    Post subject: Reply with quote

magesh_rathnam,

You need to have XML extender installed to generate xml files.

Check this link

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DXXXA710/CCONTENTS?DT=20010215162220

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group