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 » Using CONSTANT in ESQL

Post new topic  Reply to topic
 Using CONSTANT in ESQL « View previous topic :: View next topic » 
Author Message
hardcore
PostPosted: Sun Aug 28, 2005 7:42 pm    Post subject: Using CONSTANT in ESQL Reply with quote

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
View user's profile Send private message
elvis_gn
PostPosted: Sun Aug 28, 2005 8:34 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
javaforvivek
PostPosted: Sun Aug 28, 2005 10:57 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
hardcore
PostPosted: Sun Aug 28, 2005 11:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
javaforvivek
PostPosted: Sun Aug 28, 2005 11:17 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
hardcore
PostPosted: Sun Aug 28, 2005 11:48 pm    Post subject: Reply with quote

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
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 » Using CONSTANT in ESQL
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.