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 » EVAL with If Condition

Post new topic  Reply to topic
 EVAL with If Condition « View previous topic :: View next topic » 
Author Message
kirankinnu
PostPosted: Fri Jan 22, 2010 8:17 am    Post subject: EVAL with If Condition Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

Hi Folks,
I am having some coding difficulty. Maybe someone could point out how to handle this.

We have a dynamic Condition that keeps changing. I should evaluate the condition and return If its true or false. I am using EVAL for this. So here is am example

SET X = '(A>B)'
SET R = EVAL(X);

The above EVAL Should return TRUE if A>B or else return FALSE. A, B are dynamic XPATH's and will keep changing. The Condition also will change, Like we can expect A<B or A=B..

We are getting 'Error Evaluating Expression' When I use the above logic. Can we use EVAL function or Statement of IF condition.

How can we handle the above scenario. I would appreciate any solution or workaround.

Thank you,
Kiran
Back to top
View user's profile Send private message
broker_new
PostPosted: Fri Jan 22, 2010 8:56 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

I am not 100 % sure but try using "{" "}" for dynamically changing fields and see what happens.
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
kirankinnu
PostPosted: Fri Jan 22, 2010 9:00 am    Post subject: Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

No use with using { }..It gives a Syntax Error while Evaluating the expression
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Jan 22, 2010 9:56 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Can you provide an actual example of the ESQL you are using that fails, along with an example of the dynamic expression you are using?

Note that the EVAL function can only eval expressions, while the EVAL statement can only eval statements. As IF is a statement, you need to use the EVAL statement to eval an IF

Regards,
_________________
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
View user's profile Send private message
kirankinnu
PostPosted: Fri Jan 22, 2010 11:16 am    Post subject: Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

The EVAL statement did the trick. I was using EVAL as function and was getting errors while executing.

Thank you for the Support

Regards,
Kiran
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 » EVAL with If Condition
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.