gll0905 Member
Registered: Nov 2002 Location: South_Africa Posts: 6
|
db2 mqxml extenderI am trying to read an xml message from a queue and store the individual data elements into db2 columns. I don't know where to look as i am not getting any errors when i run the stored procedures.
I am running on win2k, mq 5.2, db2 7.2.
This is the sequence of events i am following:
create database MQXMLDB
create table INSURED, add columns NAME DATEOFBIRTH
create table AGENT, add columns AGENTID AGENTNAME
create table COVERAGE, add columns PRODUCTID INSAMOUNT
enable the database for XML Extender
%dxxinstallpath%\bin\dxxadm enable_db db_name
enable the database for MQFunctions
%SQLLIB%\bin\enable_MQFunctions -n db_name -u user_id -p password
enable the database for MQXML
%dxxinstallpath%\bin\enable_MQXML -n db_name -u user_id -p password
(-force)
db2 connect to db_name
Bind database to XML Extender
db2 "bind %dxxinstallpath%\bnd\@dxxbind.lst"
Bind database to CLI
db2 "bind %db2installpath%\bnd\@db2cli.lst"
Bind database to MQXML
db2 "bind %dxxinstallpath%\bnd\mqxml.bnd"
db2 terminate
This is the xml file i am using:
?xml version="1.0" encoding="UTF-8"?>
<Application>
<Insured>
<Name>John Doe</Name><DateOfBirth>1950-01-01</DateOfBirth>
<Coverage><Amt>100000</Amt><Code>Life1</Code></Coverage>
</Insured>
<Agent><Id>A101</Id><Agent_Name>Brian Lee</Agent_Name></Agent>
</Application>
created the dtd file validated the file
done the RDB to XML mappings and created a dad file.
put the xml file onto a queue:
db2 "connect to MQXMLDB"
db2 "Values db2xml.MQSENDXMLFILE('%XMLDIR%\message.xml')"
db2 "terminate"
the message appears on the default queue DB2MQ_DEFAULT_Q
read and decompose the xml message and save the untagged data in the db columns as specified in the dad file:
db2 Call db2xml.DXXMQINSERTALL(DB2MQ_DEFAULT_Q, DB2MQ_DEFAULT_MQM, "%XMLDIR%\message.dad", ?)
output on the screen:
STATUS: 0:0:0
"DXXMQINSERTALL" RETURN_STATUS: "0"
This i assume means no errors.
But the db columns are empty.
Thanks

Report this post to a moderator | IP: Logged
|