xml parse db2 z/os table having clob data columns

Saurabh Tripathi

xml parse db2 z/os table having clob data columns

Hi,

Is it possible to parse a base table data in Db2 for z/os v11 along with lob values into an xml using xmlparse or other function? 

Jørn Thyssen

RE: xml parse db2 z/os table having clob data columns
(in response to Saurabh Tripathi)

Hi Saurabh,

If you want to create a XML document from values in a table you can use XMLDOCUMENT, XMLELEMENT, XMLNAMESPACE, XMLATTRIBUTES, and more. 

https://www.ibm.com/support/knowledgecenter/en/SSEPEK_11.0.0/sqlref/src/tpc/db2z_bif_xmldocument.html

https://www.ibm.com/support/knowledgecenter/en/SSEPEK_11.0.0/sqlref/src/tpc/db2z_bif_xmlelement.html

I am unsure if you can pass a CLOB to XMLELEMENT, so it will probably require some testing and experimenting.

 

 

Best regards,

Jørn Thyssen

Rocket Software
77 Fourth Avenue • Waltham, MA • 02451 • USA
E: [login to unmask email] • W: www.rocketsoftware.com 

Views are personal.