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 Support » Memory Allocation - PROPAGATE

Post new topic  Reply to topic
 Memory Allocation - PROPAGATE « View previous topic :: View next topic » 
Author Message
Venkatpabolu
PostPosted: Thu May 02, 2013 8:27 pm    Post subject: Memory Allocation - PROPAGATE Reply with quote

Newbie

Joined: 04 Mar 2013
Posts: 9

Hi,

I am going through a PDF that teaches ESQL coding... below pasted text is from that PDF. In case two when PROPAGATE DELETE NONE is issued, the next step is ' SET outputroot = inputroot', why should we again initialize outputroot ? My understanding is that outputroot still has data assigned in an instruction prior to PROPAGATE.

Case 1:

SET OutputRoot = InputRoot;
PROPAGATE; SET OutputRoot = InputRoot;
PROPAGATE TO TERMINAL ’Out1’;
SET OutputRoot = InputRoot;
PROPAGATE TO LABEL ’ThirdCopy’;

In the above example, the content of OutputRoot is reset before each PROPAGATE, because by default the node clears the output message buffer and reclaims the memory when the PROPAGATE statement completes. An alternative method is to instruct the node not to clear the output message on the first two PROPAGATE statements, so that the message is available for routing to the next destination. The code to do this iS:

Case 2 :

SET OutputRoot = InputRoot;
PROPAGATE DELETE NONE;
SET OutputRoot = InputRoot;
PROPAGATE TO TERMINAL ’Out1’
DELETE NONE;
SET OutputRoot = InputRoot;
PROPAGATE TO LABEL ’ThirdCopy’;

If you do not initialize the output buffer, an empty message is generated, and the message flow detects an error and throws an exception.

Can someone help me answer ?
Back to top
View user's profile Send private message
Esa
PostPosted: Thu May 02, 2013 11:13 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1314
Location: Sweden

You are right. If the message is propagated with DELETE NONE, there is no need to copy the input message to OutputRoot again. On the contrary, depending on what is being done in the flow, in some rare cases it might be even harmful.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri May 03, 2013 5:42 am    Post subject: Re: Memory Allocation - PROPAGATE Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 20986
Location: Ohio, USA

Venkatpabolu wrote:
I am going through a PDF that teaches ESQL coding.


What PDF? Sourced from where? Post a link.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Esa
PostPosted: Fri May 03, 2013 7:38 am    Post subject: Re: Memory Allocation - PROPAGATE Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1314
Location: Sweden

Venkatpabolu wrote:

Can someone help me answer ?


Somebody has written a pdf for preparing for a certification test?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri May 03, 2013 8:06 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 13042

You should copy InputRoot to OutputRoot when it makes sense.

If you don't know when it makes sense, then run experiments and read the documentation and think about what you read and think about the experiments.

It's easy to learn things using this simple technique.
Back to top
View user's profile Send private message
Esa
PostPosted: Fri May 03, 2013 11:32 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1314
Location: Sweden

mqjeff wrote:
You should copy InputRoot to OutputRoot when it makes sense.


Like when you need to modify it just a bit.

@Venkatpabolu:
Now here's the next exercise for you:

Would you believe that you can propagate InputRoot directly without having to copy it to OutputRoot?
Try to figure out how to do it!
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 Support » Memory Allocation - PROPAGATE
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.