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 » Looping a segment of nodes

Post new topic  Reply to topic
 Looping a segment of nodes « View previous topic :: View next topic » 
Author Message
MQDummy
PostPosted: Wed Jun 12, 2002 8:45 am    Post subject: Looping a segment of nodes Reply with quote

Novice

Joined: 11 Jun 2002
Posts: 23

Hi,

If i have a message flow, and i want to do a repeat loop for some of the nodes, what should i do... ?

Best Rgds!
Back to top
View user's profile Send private message
kirani
PostPosted: Wed Jun 12, 2002 8:59 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Yes, you can implement loop within a message flow. I can explain better if I know what exactly you want to do. Please explain your requirement.

This topic has been discussed in this forum before. Do a search on "loop" and you will be able to find the thread.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
MQDummy
PostPosted: Wed Jun 12, 2002 9:04 am    Post subject: Reply with quote

Novice

Joined: 11 Jun 2002
Posts: 23

I want to loop some datainsert nodes for N times, how do i set it up ...?

Thanks!
Back to top
View user's profile Send private message
kirani
PostPosted: Wed Jun 12, 2002 9:17 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

If you have input message containing repeating elements and you want to insert them into database in a loop, you can do it in a single compute or DB node. Here is the pseudo code,
Code:

i=1;
cnt = cardinality(inputmessage.repeatingelement[])
while ( i<=cnt)
  insert into database.sometable(field1,field2,...) values (inputmessage.repeatingelement[i].value1, inputmessage.repeatingelement[i].value2, ...)
  set i = i+1;
end while;


What document you are referring to?
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
MQDummy
PostPosted: Wed Jun 12, 2002 9:31 am    Post subject: Reply with quote

Novice

Joined: 11 Jun 2002
Posts: 23

I have several DataInsert Nodes to update multiple tables.
And i have a computational node before them to loop thru the data then propagate one by one to the 1st DataInsert Node,
is this a correct method to do it...?

Sidetrack abit

I have a message set which defines : File->Line(s)->Elements

When i put a file containing one line into the queue, it parses it correctly but doesn't for multiple lines, what could be the reason...?

I've set the Group Terminator under the TDF to be <CR><LF> for each Line Type...
Back to top
View user's profile Send private message
kirani
PostPosted: Wed Jun 12, 2002 3:03 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Quote:
I have several DataInsert Nodes to update multiple tables.
And i have a computational node before them to loop thru the data then propagate one by one to the 1st DataInsert Node,
is this a correct method to do it...?

This is how I would do it!

Quote:

I have a message set which defines : File->Line(s)->Elements

When i put a file containing one line into the queue, it parses it correctly but doesn't for multiple lines, what could be the reason...?

I've set the Group Terminator under the TDF to be <CR><LF> for each Line Type...

What is the exact BIP error you are getting? Can you post ExceptionList here?
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
MQDummy
PostPosted: Wed Jun 12, 2002 11:08 pm    Post subject: Reply with quote

Novice

Joined: 11 Jun 2002
Posts: 23

There is no error when i send in a file with one line for parsing, however when i send in a text file with multiple lines into the queue, then the error below happens :

Quote:

"The TDF parser could not complete parsing because the bitstream contains more data than expected. This could be caused by either an incorrect message definition or by an incorrect message."


Lets say i want to define a message set with elements like this
<File>
<line>
<astring></astring>
<bstring></bstring>
<cstring></cstring>
</line>
</File>

How should i do it? Right now it only parses files with just one line element correctly.[/quote]
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 » Looping a segment of nodes
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.