Author |
Message
|
pan_khandar |
Posted: Tue Jul 09, 2002 10:56 am Post subject: GLOBLE VARIABLES |
|
|
Novice
Joined: 21 Jun 2002 Posts: 17
|
Hi,
Is there any way to define and set Globle variable like Environment.Variables etc in 2.0.2?
Thanks
Pankaj
-=------------------------------------ |
|
Back to top |
|
 |
kirani |
Posted: Tue Jul 09, 2002 2:13 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Pankaj,
Depending on your requirement you could use any of these options to store global variables:
1. Use WKSPACE parser (SupportPac IA0E) to pass data across nodes within single message processing scope.
2. Use PostIt plug-in (SupportPac IA0H) to share data across message flows.
3. Use DxPool plug-in (SupportPac Ia79).
4. Use persistent storage (database, files or queue) to store global variables.
5. Use simple ESQL like SET OutputDestinationList.Variables.Myvar = 'somevalue';
to store local variables into DestinationList. This is similar to WKSPACE parser. _________________ 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 |
|
 |
AlexeiSkate |
Posted: Thu Jul 25, 2002 5:23 pm Post subject: |
|
|
Centurion
Joined: 10 Apr 2002 Posts: 123
|
kirani wrote: |
Pankaj,
5. Use simple ESQL like SET OutputDestinationList.Variables.Myvar = 'somevalue';
to store local variables into DestinationList. This is similar to WKSPACE parser. |
Kirani,
Does Myvar in the above SET statement exists only for one input msg and then get reset for the next msg, or can it exist like a global variable in standard programming where every single input msg can update the MyVar ? |
|
Back to top |
|
 |
kirani |
Posted: Thu Jul 25, 2002 6:23 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Alex,
The scope of Myvar here is for one message only. It will get reset for next messages. _________________ 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 |
|
 |
AlexeiSkate |
Posted: Wed Jul 31, 2002 12:48 pm Post subject: |
|
|
Centurion
Joined: 10 Apr 2002 Posts: 123
|
If I have a group of messages on a queue and as each msg passes through the message flows, I need to assign it an incremental sequential number. Is the only way to do this is by storing an initial number in the local db2 dabase table? Then as each msg passes through the msg flows, read the number, increment it by one, assign it to the message, and then update the db table with the new incremented number.
-thanks,
Alex |
|
Back to top |
|
 |
sgopal |
Posted: Wed Jul 31, 2002 1:22 pm Post subject: |
|
|
Acolyte
Joined: 30 Jul 2002 Posts: 63
|
Scope of Local environment is limited only to the current message. The safest option is to store the value in the database and then fetch, increment and update it. But be careful with transaction coordination if you are doing so. (synchronizing the message rollback and database counter value)
thanks -- Gopal |
|
Back to top |
|
 |
|