Mainframeforum
Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Calendar Find other members Frequently Asked Questions Search Logout

Mainframeforum Mainframeforum > IBM - OS's and Program Products > Program Products > WebSphere MQ - MQ/Series® > db2 mqxml extender
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
  gll0905
Member

Registered: Nov 2002
Location: South_Africa
Posts: 6

db2 mqxml extender

I 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

gll0905 is offline Old Post18th Nov 2002  18:07
Click Here to See the Profile for gll0905 Click here to Send gll0905 a Private Message Find more posts by gll0905 Add gll0905 to your buddy list   Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 11:06. Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 

< Contact Us - mainframeforum - Text Roadmap - >

Powered by: vBulletin  |  Copyright ©2000, 2002, Jelsoft Enterprises Limited.
Copyright �2001, 2002 - SPAGiRiK Limited. Limassol, Cyprus. 

Site Meter