|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WMB 6 or 6.1 \ Global Namespace Declaration |
« View previous topic :: View next topic » |
Author |
Message
|
hopsala |
Posted: Tue Oct 07, 2008 7:59 am Post subject: WMB 6 or 6.1 \ Global Namespace Declaration |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
Hey. Hopefully my recent barrage of questions is at least interesting, or useful for the next generations.
What I wish to achieve is one ESQL file containing all my namespace declarations for the entire project (or maybe even for more than one project?). This is quite easy to attain if I have one schema, but I have quite a few. I already know that global variables can be defined, if you also define "getter" functions for each variable as a workaround (http://www.mqseries.net/phpBB2/viewtopic.php?t=20452&highlight=global). I don't think this will work with namespaces...
any ideas? I'm stumped. |
|
Back to top |
|
 |
hopsala |
Posted: Wed Oct 15, 2008 6:20 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
bump. Will no one help a damsel (well, a male damsel) in distress? |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Oct 15, 2008 6:33 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If your schemas share a common ancestor, you maybe can put your namespaces in an ESQL file that's in that common ancestor schema, and access them that way.
hopefully they do not share a common ancester as high up as "com" or "org"...  |
|
Back to top |
|
 |
mgk |
Posted: Wed Oct 15, 2008 9:34 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi.
As you noticed, you canot return NAME or NAMESPACE variables from a function. However, one idea I have had is to DECLARE all your namespace variables in one "root" SCHEMA as CONSTANT CHARACTER variables, and define getter functions as you mention. However, you then declare your NAMESPACE variables to be initialised from the result of the getter function in the other schemas where you need to use them. This is not great but is should work (but I have not tested it).
E.g in a schema where you need to use namespace xyz:
Code: |
DECLARE xyx NAMESPACE globalSchema.getNamespaceXyz(); |
_________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|