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 » parsing XML

Post new topic  Reply to topic
 parsing XML « View previous topic :: View next topic » 
Author Message
muneetb
PostPosted: Wed Apr 30, 2003 1:34 pm    Post subject: parsing XML Reply with quote

Newbie

Joined: 25 Oct 2002
Posts: 8

Hi--

I have been able to save my XML strings into the db as CLOBs. Now I am trying to retrieve it from the db and post it to a queue. Every record goes on the queue as a seperate message. Here is what I am doing and it does not work. Actually it does work for the first record and fails on the next one.


SET Environment.TMP.blob[] =
PASSTHRU('SELECT BLOB(T.MSGDATA) AS TX FROM MQ.BATCHWO AS T WHERE T.MSGID = ? AND (T.ACTIONIND = ? OR T.ACTIONIND= ? OR T.ACTIONIND= ? OR T.ACTIONIND= ?)', InputRoot.MQMD.CorrelId, '711', '712', '701', '708');

SET CARD=CARDINALITY(Environment.TMP.*[]);

SET j=1;

WHILE j<=CARD DO


CREATE FIRSTCHILD OF Environment.TMP.TRAN DOMAIN 'XML' PARSE(Environment.TMP.blob.*[j]);
SET OutputRoot.XML = Environment.TMP.TRAN.XML;
SET Environment.TMP = NULL;
SET OutputRoot.MQMD.CodedCharSetId = 819;
SET j=j+1;
PROPAGATE;
SET intTreeCount = 1;
WHILE intTreeCount < CARDINALITY(InputRoot.*[]) DO
SET OutputRoot.*[intTreeCount] = InputRoot.*[intTreeCount];
SET intTreeCount=intTreeCount+1;
END WHILE;

END WHILE;

RETURN FALSE;
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Thu May 01, 2003 5:24 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

How do you know it doesn't work on the second time around? Does it give you an error message somewhere? What is that error message?

Also, you don't say what version and CSD level you're at. If you're using 2.1, your code would be more efficient if you used references rather than cardinality.
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 » parsing XML
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.