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 » declaring a Global Variable

Post new topic  Reply to topic
 declaring a Global Variable « View previous topic :: View next topic » 
Author Message
MQUser123
PostPosted: Wed Apr 07, 2004 1:33 pm    Post subject: declaring a Global Variable Reply with quote

Novice

Joined: 28 Aug 2003
Posts: 18

I want to declare a global Variable in one of my compute Nodes and then use that global variable in another compute Node. This is what I have done, but it doesnt work:

Compute Node 1:
(This is the only Code that Ihave in the first Node)

SET OutputRoot = InputRoot;
SET OutputLocalEnvironment.Variables.Email = 'someEmailAddress'

Compute Node 2:


CREATE FIRSTCHILD OF OutputRoot.XML.Message Domain('XML') NAME 'To' VALUE Email;




The Variable Email is always blank. What am I doing wrong? How do I fix this?
Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Apr 07, 2004 1:39 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Use Environment instead of OutputLocalEnvironment.

Or make sure to change the mode of your Compute Node to pass "LocalEnvironment and Message", instead of the default of "Message".

And you also need to refer to your field as 'InputLocalEnvironment.Variables.Email", not "Email" in your later compute node.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
MQUser123
PostPosted: Wed Apr 07, 2004 2:04 pm    Post subject: global variable Reply with quote

Novice

Joined: 28 Aug 2003
Posts: 18

I changed it to Environment.Variables.Email and chaged the Compute Mode to LocalEnvironment and Message. Also made the change at the latter Compute node to :

CREATE FIRSTCHILD OF OutputRoot.XML.Message Domain('XML') NAME 'To' VALUE InputLocalEnvironment.Variables.Email;



It still fails. What should the compute Mode be for the second Compute Node.
Thanks for the response.
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Apr 07, 2004 5:10 pm    Post subject: Reply with quote

Jedi

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

Quote:
I changed it to Environment.Variables.Email and chaged the Compute Mode to LocalEnvironment and Message

You only needed one OR the other.
Quote:
VALUE InputLocalEnvironment.Variables.Email

That's won't work with your 1st change. This is looking for the LocalEnvironment. You used the Environment.

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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » declaring a Global Variable
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.