ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Large XML message insert !!

Post new topic  Reply to topic
 Large XML message insert !! « View previous topic :: View next topic » 
Author Message
rajmq
PostPosted: Fri Oct 12, 2007 1:18 am    Post subject: Large XML message insert !! Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

All,

Able to insert the single xml message using simple message flow but if the same XML contains many transaction i have to insert the each transaction as separate record.

In this case how do i write the dynamic esql for insert ? also more transaction (<50) records in a single message so what is best way to write the code without impacting the performace.

TIA

_________________
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified System Administrator - WebSphere Business Integration Message Broker V6.0
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 12, 2007 1:36 am    Post subject: Re: Large XML message insert !! Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

rajmq wrote:
Able to insert the single xml message using simple message flow but if the same XML contains many transaction i have to insert the each transaction as separate record.


Do you mean insert into a database?

Simplist solution is to put a compute node in front of your existing insert that takes each transaction and propogates it to the existing one.

Other, possibly better and more elegant solutions may be available.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Fri Oct 12, 2007 7:46 am    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

I hope you already know about looping using Cardinality or MoVE/LASTMOVE. That will make your code dynamic.
Also for performance there are many posts available and you can also check developerworks for guidance on the same.
I think what you want is guidance in developing flows that handle large messages.
These posts and developerworks should help you there.
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
rajmq
PostPosted: Fri Oct 12, 2007 8:01 am    Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

i have an issue while spliting the records, when i use the below code it is fetching different items and passing to another compute node for inserting but their no.of record count is (OutputRoot.XML.ITEM ) showing null ..

DECLARE I INTEGER 1;
DECLARE J INTEGER;
DECLARE rTran REFERENCE TO InputRoot.XML.testxml.generterequest;
SET J = CARDINALITY(rTran.itmes[]);
WHILE I <= J DO
SET OutputRoot = InputRoot;
SET OutputRoot.XML.ITEM = rTran.items[I];
PROPAGATE;
SET I = I+1;
END WHILE;



_________________
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified System Administrator - WebSphere Business Integration Message Broker V6.0
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Fri Oct 12, 2007 8:16 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi rajmq,

Quote:
SET J = CARDINALITY(rTran.itmes[]);
I think the problem is with the spelling...

Regards.
Back to top
View user's profile Send private message Send e-mail
rajmq
PostPosted: Fri Oct 12, 2007 8:23 am    Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

Thanks for pointing that..but

esql code is correct SET J = CARDINALITY(rTran.items[])

able to print the value in the compute code but not in the next node.
_________________
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified System Administrator - WebSphere Business Integration Message Broker V6.0
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 12, 2007 9:06 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There are a number of basic mistakes in how you've coded this, from a performance/memory perspective. One is that you're always sending out the full message every time. Another is that you're using message indexes, instead of references. Also, you're using the XML Domain.

In addition, OutputRoot.XML.ITEM is not going to be the count of anything. It's going to be a duplicate of whatever is the Ith item of InputRoot.XML.testxml.generaterequest.items.

And finally, you're creating an OutputRoot.XML message tree that has two root nodes - ITEM and testxml.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
rajmq
PostPosted: Fri Oct 19, 2007 5:33 am    Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

The following IBM link, i have used for handling the large xml message spiltup ..


http://www.ibm.com/developerworks/websphere/library/techarticles/0505_storey/0505_storey.html


_________________
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified System Administrator - WebSphere Business Integration Message Broker V6.0
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Large XML message insert !!
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.