In this step, you use the dxxGenXML() stored procedure to compose the XML document specified by the DAD file. This stored procedure returns the document as an XMLVARCHAR UDT.
To compose the XML document:
getstart_stp.cmd
The XML document has been composed and is stored in the RESULT_TAB table.
You can see samples of stored procedures that can be used in this step in the following files:
DB2 CONNECT TO SALES_DB DB2 SELECT db2xml.Content(db2xml.xmlvarchar(doc), 'c:\dxx\samples\cmd\getstart.xml') FROM RESULT_TAB
Alternatively, you can run the following command to export the file:
getstart_exportXML.cmd
This lesson teaches you how to get one or more composed XML documents using DB2 stored procedure's result set feature to allow you to fetch each row to get each document. As you get each row of document, you can export it to a file, which is the simplest way to demonstrate this feature. For more efficient ways of fetching data see the CLI examples in c:\dxx\samples\cli.