Author |
Message
|
Glass |
Posted: Thu Mar 02, 2006 8:15 am Post subject: Using File Input Node in ESQL inWebSphere Message Broker 5.0 |
|
|
Acolyte
Joined: 02 Mar 2006 Posts: 56
|
Hi,
I am using WebSphere Message Broker 5.0 and wanted to pass in a value in ESQL using a file. This file will contain a variable that changes between environments. Does anybody know how I can use a file to pass a value in ESQL?
Cheers! |
|
Back to top |
|
 |
wschutz |
Posted: Thu Mar 02, 2006 8:46 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
so, you want to have a file with an esql variable value in it and somehow have esql in a compute node pick up that value? can you give an example? _________________ -wayne |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Mar 02, 2006 8:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If you move to v6, then you can promote any ESQL variable and set the contents in the BAR file. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Glass |
Posted: Thu Mar 02, 2006 9:03 am Post subject: |
|
|
Acolyte
Joined: 02 Mar 2006 Posts: 56
|
Currently in the ESQL I have a SET and an IF statement:
This is what I have now:
SET ENV = 'T';
IF (ENV = 'P') THEN
SET "OutputRoot"."XML"."XMLRoot"."env" = 'P';
SET "OutputRoot"."XML"."XMLRoot"."ID" = 'ABC';
ELSE
IF(ENV = 'T') THEN
SET "OutputRoot"."XML"."XMLRoot"."env" = 'T';
SET "OutputRoot"."XML"."XMLRoot"."ID" = 'XYZ';
END IF;
END IF;
This way I always have to change code and SET the ENV to P or T depending on the environment. What I would like to do is have two different files that contain the value for ENV as T or P and have esql call this file and get the input value for ENV from there and use it to set the ID. By doing this, I will eliminate changing the code everytime and just have two environment specific files with the appropriate ENV value.
Hope this helps. |
|
Back to top |
|
 |
wschutz |
Posted: Thu Mar 02, 2006 9:08 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
set an environment variable and use the "get all environment variables" supportpac.... _________________ -wayne |
|
Back to top |
|
 |
fschofer |
Posted: Thu Mar 02, 2006 9:23 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
|
Back to top |
|
 |
Glass |
Posted: Thu Mar 02, 2006 9:23 am Post subject: |
|
|
Acolyte
Joined: 02 Mar 2006 Posts: 56
|
So the only way to do it in v5 is to get the SupportPac IA06? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Mar 02, 2006 9:24 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Or write your own custom plug-in. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JT |
Posted: Thu Mar 02, 2006 10:48 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Quote: |
So the only way to do it in v5 is to get the SupportPac IA06? |
........or use a database, which you can then access using the following methods:- SQL Select calls from a Compute Node
- The IA91 Broker Domain Data Store supportpac has a 'CacheConfig' node that initalizes a memory cache from a database at the broker domain level. The cache is available to all message flows that are managed by the broker, and the cache exists for the life of the broker, thus eliminating the need to perform a multitude of SQL Select calls.
|
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Mar 02, 2006 8:00 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi Glass,
What is the name of the queue manager in your test and production environment ?
If you can get the 'T' or 'P' from some variable in your message itself (like the queue manager name), you will not have to run around using a support pack at all
Note: I mention the queue manager name as in my previous project, the design team created the queue managers with an alphabet indicating Devt, Test and Prod environments....This helped us out of the same problem you have now.
Regards. |
|
Back to top |
|
 |
Glass |
Posted: Fri Mar 03, 2006 9:18 am Post subject: |
|
|
Acolyte
Joined: 02 Mar 2006 Posts: 56
|
The Queue Manager names are the same between Test, Production and Development environments so I guess I cannot use them. |
|
Back to top |
|
 |
|