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 » insert XML in output tree

Post new topic  Reply to topic
 insert XML in output tree « View previous topic :: View next topic » 
Author Message
rasol
PostPosted: Wed Dec 20, 2006 1:48 pm    Post subject: insert XML in output tree Reply with quote

Novice

Joined: 08 Aug 2006
Posts: 14

I got data from DB2 and stored in EV as

E.V.temp[] =
<DetailRecords>
<Name>D2</Name>
<Location>
<Locationcode>
<code>RFC</code>
<Amount>90</Amount>
<Amount>80</Amount>
<Locationcode>
<Location>
</DetailRecords>


Output Tree has a XML structure as

<Message>
<Data>
<DetailRecords>
<Name>D1</Name>
<Location>
<code>TDK</code>
<Amount>10</Amount>
<Amount>20</Amount>
<Location>
</DetailRecords>
<TotAmount>1700<TotAmout>
</Data>
</Message>

I wan to insert E.V.temp[] into Output tree.

Expected Outputtree should look like

<Message>
<Data>
<DetailRecords>
<Name>D1</Name>
<Location>
<code>TDK</code>
<Amount>10</Amount>
<Amount>20</Amount>
<Location>
</DetailRecords>
<DetailRecords>
<Name>D2</Name>
<Location>
<Locationcode>
<code>RFC</code>
<Amount>90</Amount>
<Amount>80</Amount>
<Locationcode>
<Location>
</DetailRecords>
<TotAmount>1700<TotAmout>
</Data>
</Message>


Any Help.
Back to top
View user's profile Send private message
sarat
PostPosted: Wed Dec 20, 2006 9:43 pm    Post subject: Reply with quote

Centurion

Joined: 29 Jun 2005
Posts: 136
Location: India

Hi rasol,

are you using any message sets or you want to hardcode???
_________________
With Regards,
Sarat.
Back to top
View user's profile Send private message
sarat
PostPosted: Wed Dec 20, 2006 9:48 pm    Post subject: Reply with quote

Centurion

Joined: 29 Jun 2005
Posts: 136
Location: India

If you want to hard code...first check the cardinality of the E.V.temp[] then repaet the loop that much times...
_________________
With Regards,
Sarat.
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Dec 21, 2006 9:56 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Look at the ATTACH statement.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
JosephGramig
PostPosted: Thu Dec 21, 2006 10:22 am    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

And why can't I have a variable type of LIST?

I hate sticking stuff in Environment that I don't need beyond the current function/procedure. It makes it messy.

I know, detach the reference and delete it when done.
_________________
Joseph
Administrator - IBM WebSphere MQ (WMQ) V6.0, IBM WebSphere Message Broker (WMB) V6.1 & V6.0
Solution Designer - WMQ V6.0
Solution Developer - WMB V6.1 & V6.0, WMQ V5.3
Back to top
View user's profile Send private message AIM Address
jefflowrey
PostPosted: Thu Dec 21, 2006 11:13 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

JosephGramig wrote:
And why can't I have a variable type of LIST?


well, in v6 you can have a variable type ROW.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JosephGramig
PostPosted: Thu Dec 21, 2006 12:20 pm    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

yes, but I cannot select a bunch of rows out and assign them to a local variable.
_________________
Joseph
Administrator - IBM WebSphere MQ (WMQ) V6.0, IBM WebSphere Message Broker (WMB) V6.1 & V6.0
Solution Designer - WMQ V6.0
Solution Developer - WMB V6.1 & V6.0, WMQ V5.3
Back to top
View user's profile Send private message AIM Address
jefflowrey
PostPosted: Thu Dec 21, 2006 1:02 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

JosephGramig wrote:
yes, but I cannot select a bunch of rows out and assign them to a local variable.


...

I think that's exactly what a ROW variable is for...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JosephGramig
PostPosted: Thu Dec 21, 2006 1:24 pm    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

No, it contains exactly one ROW.

You must use the THE statement to assign to it and it returns just the first row. Otherwise, you must assign to a WHATEVER[] to assign a LIST.

There is no LIST data type that you can declare. I've tried it.
_________________
Joseph
Administrator - IBM WebSphere MQ (WMQ) V6.0, IBM WebSphere Message Broker (WMB) V6.1 & V6.0
Solution Designer - WMQ V6.0
Solution Developer - WMB V6.1 & V6.0, WMQ V5.3
Back to top
View user's profile Send private message AIM Address
jefflowrey
PostPosted: Thu Dec 21, 2006 1:29 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

From the Message Routing sample in the samples gallery...

Code:
declare CacheQueueTable SHARED ROW; -- a shared variable that can be used by instances of a flow

....

SET  CacheQueueTable.DestinationData[] = 
(
    SELECT S.QUEUE_MANAGER, S.QUEUE_NAME ,S.VARIABLE2, S.VARIABLE3
    FROM Database.ROUTING_TABLE as S
    WHERE
    S.VARIABLE1 = Variable1);

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JosephGramig
PostPosted: Thu Dec 21, 2006 2:31 pm    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

Well, I never saw the example with the extra element of the ROW. I was trying to return it to the name directly, which works for one ROW.

Live and learn. That example would be nice in the documentation though.
_________________
Joseph
Administrator - IBM WebSphere MQ (WMQ) V6.0, IBM WebSphere Message Broker (WMB) V6.1 & V6.0
Solution Designer - WMQ V6.0
Solution Developer - WMB V6.1 & V6.0, WMQ V5.3
Back to top
View user's profile Send private message AIM Address
mgk
PostPosted: Thu Dec 21, 2006 3:01 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

The easiest way to understand a ROW variable is to see it as a User defined Tree (which is exactly what it is). Anything you can do with the Environment tree or LocalEnvironment tree can be done to variables of type ROW in V6.

Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
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 » insert XML in output tree
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.