|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Using CONSTANT in ESQL |
« View previous topic :: View next topic » |
Author |
Message
|
hardcore |
Posted: Sun Aug 28, 2005 7:42 pm Post subject: Using CONSTANT in ESQL |
|
|
Novice
Joined: 11 Apr 2005 Posts: 22
|
Hi Experts,
I have using variable to store user error in my message flows, I am thinking of declaring CONSTANT variables in a separate ESQL file and put in one place so that I can use these constants in my esql modules, so that it will be easier to maintain.
Is anybody used CONSTANT in your applications, please help.
I have created a separate ESQL file and declared few constants.
DECLARE COM_ERR_CODE CONSTANT CHAR 'ERR_CODE_7007';
and tried to use the constant name COM_ERR_CODE CONSTANT in my other ESQL code in the same project, but I am unable to deploy, I think the way I am using to attach the constants in ESQL is wrong, Experts Pls. HELP.. |
|
Back to top |
|
 |
elvis_gn |
Posted: Sun Aug 28, 2005 8:34 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi hardcore,
I wouldn't expect the other ESQL to deploy....
If the EQSL is in another fle just give it in the project references and check if the Constant name comes up automatically when u do a "CTRL+Space"..
Run the flow and check if the referencing is working...Ur idea od declaring the constants seems to be fine, but only if u need these references for many flows. |
|
Back to top |
|
 |
javaforvivek |
Posted: Sun Aug 28, 2005 10:57 pm Post subject: |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
hardcore wrote:
Tried to use the constant name COM_ERR_CODE CONSTANT in my other ESQL code in the same project
elvis_gn wrote:
Quote: |
If the EQSL is in another fle just give it in the project references |
Is it really needed to add the CONSTANTS-ESQL file in the project reference, if it is in the same project as that of referencing ESQL File? _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
hardcore |
Posted: Sun Aug 28, 2005 11:07 pm Post subject: |
|
|
Novice
Joined: 11 Apr 2005 Posts: 22
|
Thanks Guys for your replies,
I followed Elvis's by using "CTRL+Space" and I found that it is not possible to use CONSTANTS across schema (referencing will not work in this case), but I created one new ESQL in and declared all the CONSTANTS, I am able to use these CONSTANTS across ESQL modules in the same schema. |
|
Back to top |
|
 |
javaforvivek |
Posted: Sun Aug 28, 2005 11:17 pm Post subject: |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
This is what I found in ESQL reference: (in chapter ESQL Modules)
Quote: |
If you want to reuse ESQL constants, functions, or procedures, you must declare them at broker schema level. You can then refer to these from any resource within that broker schema, in the same or another project. If you want to use this technique, either fully qualify the procedure, or include a PATH statement that sets the qualifier. The PATH statement must be coded in the same ESQL file, but not within any MODULE.
|
Congrats for getting it working... _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
hardcore |
Posted: Sun Aug 28, 2005 11:48 pm Post subject: |
|
|
Novice
Joined: 11 Apr 2005 Posts: 22
|
You are right vivek, but same will not apply for CONSTANT. I found the following in ESQL manual
Quote: |
You can declare constants within schemas, modules, routines, or compound statements |
I have tried giving path and declaring the CONSTANTS across schema, I got deployment error. |
|
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
|
|
|
|