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 » Appending values

Post new topic  Reply to topic
 Appending values « View previous topic :: View next topic » 
Author Message
prasannanb
PostPosted: Wed Sep 08, 2010 10:10 pm    Post subject: Appending values Reply with quote

Apprentice

Joined: 17 Apr 2009
Posts: 35

Hi,

I am saving the input in the Environment variable like below

SET Environment.Variables.Respmsg = InputRoot.MRM;

then, when I get the new values in the InputRoot, how can I "append" these new values into the original Environment.Variables.Respmsg in which I already have some values?


Please help


Thanks in advance
Back to top
View user's profile Send private message
swethabala
PostPosted: Wed Sep 08, 2010 11:24 pm    Post subject: Reply with quote

Apprentice

Joined: 25 Aug 2009
Posts: 44

Hi,

You can assign this in form of list as below:

Declare a counter i initialised to 1

start a While looop

SET Environment.Variables.Respmsg[i] = InputRoot.MRM[i];

increment counter (i = i +1

END WHILE

In this way all the values will be stored in Respmsg as a list one by one
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Sep 09, 2010 2:01 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There is no shared state between two instances of a message flow, unless you specifically build it using a database or etc.

Every time any *Input node processes a new message, it creates an entirely new Environment tree.

This is Broker 101. Please get training.
Back to top
View user's profile Send private message
swethabala
PostPosted: Thu Sep 09, 2010 2:13 am    Post subject: Reply with quote

Apprentice

Joined: 25 Aug 2009
Posts: 44

Yes if one message is processed then Environment variables will be cleared. there is no way that you can store it.

Sorry I thought you are asking about different records in same file.
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Sep 09, 2010 2:28 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Although you could use a SHARED variable to store data between messages through the same flow...
_________________
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
prasannanb
PostPosted: Thu Sep 09, 2010 4:25 am    Post subject: Reply with quote

Apprentice

Joined: 17 Apr 2009
Posts: 35

Yes I am asking about different records in the same instance of flow.

I am in a loop and each time I am getting different values in InputRoot.MRM
I want to append this value to a environment value each time so finally when I come out of loop all the values are there in single env variable.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 09, 2010 4:28 am    Post subject: Reply with quote

Grand High Poobah

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

prasannanb wrote:
I am in a loop and each time I am getting different values in InputRoot.MRM


This is a rather dubious bit of design; looping like this done carelessly (and sometimes done perfectly) can run an execution group out of memory.

There's been a number of threads in here about using aggregation or collector nodes to avoid such a loop. You may find these useful.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
visasimbu
PostPosted: Fri Sep 10, 2010 11:24 pm    Post subject: Reply with quote

Disciple

Joined: 06 Nov 2009
Posts: 171

hi prasannanb,

U may did minor mistake in your loop.. Placing your code(specially a loop) here will help you better...
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Appending values
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.