Try this: <U2XML_extraction> <file_extraction start="/CDSPVTestData/PVTestData" dictionary="D_PV.TESTDATA" null="EMPTY"/> <FIELD_extraction FIELD="KEY" path="PVTestData,MyID/text()"/> <FIELD_extraction FIELD="MYNAME" path="PVTestData,MyName/text()"/> <FIELD_extraction FIELD="MYCODE" path="PVTestData,MyCode/text()"/> </U2XML_extraction>
What I saw incorrect also was the use of dashes rather than underscore marks. Regards, LeRoy F. Dreyfuss Advanced Technical Services - U2 Technology Analyst IBM U2 Data Management Solutions Tel: 303-672-1254 Fax: 303-294-4832 Mobile: 720-341-4317 External email: [EMAIL PROTECTED] WWW: http://www.ibm.com/software/data/u2/support www.ibm.com/software/data/u2/support - Open, Query, Update, Search - Online! Don't miss out on the IBM DB2 Information Management Technical Conference September 19-24, 2004 - Las Vegas, NV Peter Veenhof <[EMAIL PROTECTED] tra.com> To Sent by: [EMAIL PROTECTED] [EMAIL PROTECTED] cc stserver.u2ug.org Subject RE: [U2] u2 XML 07/20/2004 09:13 AM Please respond to u2-users Still doesn't work, same error. I'm on UV 10.1.0 -----Original Message----- From: Leroy Dreyfuss [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 10:02 AM To: [EMAIL PROTECTED] Subject: Re: [U2] u2 XML Peter, For extraction files, it should be U2XML, and not U2xml. It is case sensitive. Regards, LeRoy F. Dreyfuss Advanced Technical Services - U2 Technology Analyst IBM U2 Data Management Solutions Tel: 303-672-1254 Fax: 303-294-4832 Mobile: 720-341-4317 External email: [EMAIL PROTECTED] WWW: http://www.ibm.com/software/data/u2/support www.ibm.com/software/data/u2/support - Open, Query, Update, Search - Online! Don't miss out on the IBM DB2 Information Management Technical Conference September 19-24, 2004 - Las Vegas, NV Peter Veenhof <[EMAIL PROTECTED] tra.com> To Sent by: [EMAIL PROTECTED] [EMAIL PROTECTED] cc stserver.u2ug.org Subject [U2] u2 XML 07/20/2004 06:33 AM Please respond to u2-users I've seen this discussed before, but have never seen any working examples. Even the examples in the PDF's from IBM do not work. I have this mapping file (CDSPVTestData.map): <U2xml root="CDSPVTestData"/> <U2xml record="PVTestData"/> <U2xml file="PV.TESTDATA" FIELD="KEY" map-to='MyID' type='S' treated-as='element' /> <U2xml file="PV.TESTDATA" FIELD="MYNAME" map-to='MyName' type='S' treated-as='element' /> <U2xml file="PV.TESTDATA" FIELD="MYCODE" map-to='MyCode' type='S' treated-as='element' /> And this BASIC program (XMLTEST): CALL OPEN("PV.DEV",PV.DEV.FILE) STATUS = XMLEXECUTE("SELECT KEY,MYNAME,MYCODE, 'RVK' ACCT FROM PV.TESTDATA TOXML ELEMENTS XMLMAPPING 'CDSPVTestData.map'","",XMLVAR,SVAR) PRINT XMLVAR WRITE XMLVAR ON PV.DEV.FILE,"TEST.XML" STOP Which successfully generate this XML (TEST.XML): <?xml version="1.0"?> <CDSPVTestData> <PVTestData> <MyID>1</MyID> <MyName>MY TEST NAME</MyName> <MyCode>MY TEST CODE</MyCode> <ACCT>RVK</ACCT> </PVTestData> </CDSPVTestData> Now here is the hard part..... I just want to use XML extraction as shown in the Chapter 7 of the BasicExt.pdf, so I write this program (XMLTESTEXT): #INCLUDE UNIVERSE.INCLUDE XML.H STATUS=PrepareXML("PV.DEV/TEST.XML",TEST_XML) IF STATUS=XML.ERROR THEN STATUS=XMLError(errmsg) PRINT errmsg STOP END STATUS = OpenXMLData(TEST_XML,"&XML&/CDSPVTestData.ext",TEST_XML_DATA) IF STATUS=XML.ERROR THEN STATUS=XMLError(errmsg) PRINT errmsg STOP END STOP And have this extraction map (CDSPVTestData.ext): <U2xml-extraction> <file-extraction start="/CDSPVTestData/PVTestData" dictionary="D_PV.TESTDATA" null="EMPTY"/> <FIELD-extraction FIELD="KEY" path="PVTestData,MyID/text()"/> <FIELD-extraction FIELD="MYNAME" path="PVTestData,MyName/text()"/> <FIELD-extraction FIELD="MYCODE" path="PVTestData,MyCode/text()"/> </U2xml-extraction> When I run this XMLTESTEXT, I get this error: "U2XMAP: Illegal U2XMAP file, missing the <U2XMAP>." Anybody able to help? I've tried various other incarnations of the EXT file from chapter 7 in the pdf but with no results. Chapter 7 doesn't even mention the U2XMAP file. I do find U2XMAP file later on in documentation but I can't see how it relates. Thanks, Peter This email and any attachments are intended solely for use of the named addressee.If you received this email in error please notify the sender by return e-mail, delete this e-mail, and refrain from any disclosure or action based on the information. ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/ [demime 1.01d removed an attachment of type image/gif which had a name of graycol.gif] [demime 1.01d removed an attachment of type image/gif which had a name of pic12924.gif] [demime 1.01d removed an attachment of type image/gif which had a name of ecblank.gif] ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/ This email and any attachments are intended solely for use of the named addressee.If you received this email in error please notify the sender by return e-mail, delete this e-mail, and refrain from any disclosure or action based on the information. ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/ [demime 1.01d removed an attachment of type image/gif which had a name of graycol.gif] [demime 1.01d removed an attachment of type image/gif which had a name of pic11281.gif] [demime 1.01d removed an attachment of type image/gif which had a name of ecblank.gif] ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/