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 » How do I define global variables

Post new topic  Reply to topic
 How do I define global variables « View previous topic :: View next topic » 
Author Message
stiffann
PostPosted: Tue Jul 02, 2002 1:31 am    Post subject: How do I define global variables Reply with quote

Apprentice

Joined: 17 Mar 2002
Posts: 26

Hi all,

I would like to define a global variable, a counter for instance, that would be accessible by all my message flows deployed in a particular Execution Group.
The aim of it is to increment a counter each time a message flow is invoked, and to trigger a specific action when the counter has a specific value.

Thank you in advance !!
Back to top
View user's profile Send private message
nico_fr
PostPosted: Tue Jul 02, 2002 1:53 am    Post subject: Environement variables Reply with quote

Newbie

Joined: 29 May 2002
Posts: 2
Location: France

In WMQI 2.1 you can save your values in the "Environement" variable.
ex:
"SET Environment.Variables.MyError='y error';"

Consequenly you'll have in memory during all the messageflow the value:
${Environment} :
(
(0x1000000)Variables = (
(0x3000000)MyError = 'My error'
)
Back to top
View user's profile Send private message Send e-mail
stiffann
PostPosted: Tue Jul 02, 2002 2:15 am    Post subject: Reply with quote

Apprentice

Joined: 17 Mar 2002
Posts: 26

The official IBM documentation (Working with Messages) says that "an empty Environment tree is created when a message is received by the input node and parsed. It has no structure or content until you populate it using ESQL statements".

So, that's why I thought that the variables created were only visible within the concerned message flow and for the concerned message.

I'll try some experimentations to verify your information.

Thanks !
Back to top
View user's profile Send private message
stiffann
PostPosted: Tue Jul 02, 2002 2:54 am    Post subject: Reply with quote

Apprentice

Joined: 17 Mar 2002
Posts: 26

As I said before, and after having experimented by myself, it seems that the "Environment" tree is created for each new message. It means that I can't store global variables in this tree.

If someone else has a good idea for that, I'm still listening to you !

Thanks in advance
Back to top
View user's profile Send private message
CodeCraft
PostPosted: Tue Jul 02, 2002 3:53 am    Post subject: Reply with quote

Disciple

Joined: 05 Sep 2001
Posts: 195

Have a check around the IBM Support Packs. I think I heard before of someone writing a node that had shared memory handling for variables between flows.

The alternative, a two column one row table in a database:

Create Table Counter
( MyKey Char(15) Primary Key,
MyValue Integer
)

You might be able to do some tuning to ensure that table remains cached. Can't think of anything nicer right now.
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 » How do I define global variables
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.