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 » CASE Statement

Post new topic  Reply to topic
 CASE Statement « View previous topic :: View next topic » 
Author Message
Sridar
PostPosted: Mon Oct 23, 2006 4:36 am    Post subject: CASE Statement Reply with quote

Acolyte

Joined: 14 May 2006
Posts: 72
Location: Chennai, India

Hi

I am using a Case structure.
In this for 2 particular conditions i want to use the same code.
i.e. 2 conditions solve same functionality.

I set the value of the 2 conditions to a variable and used it in the case statement, but i want to know if there is a direct way of doing it while using a case structure(something like an 'OR' of the conditions)

The following is the requirement

Quote:

CASE
WHEN ACT_UPDT THEN
STMTS1

WHEN ACT_INSRT THEN
STMTS2

WHEN ACT_DEL THEN
STMTS2

_________________
Thanks and Regards
Sridar
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Oct 23, 2006 4:50 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Whenever I have a question about how a statement or function in ESQL works, I always go look at the Info Center documentation on that statement.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ak04930_.htm
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Sridar
PostPosted: Mon Oct 23, 2006 4:55 am    Post subject: Reply with quote

Acolyte

Joined: 14 May 2006
Posts: 72
Location: Chennai, India

Thanks jeff

I also use the same documentation but it does not specify about combining of two conditions.
_________________
Thanks and Regards
Sridar
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Oct 23, 2006 5:03 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Well, it really does.

It says that the WHEN clause takes an Expression.

It also says that
Quote:
In the searched form, each WHEN clause expression is evaluated in turn until one evaluates to TRUE. That WHEN clause's statements are then executed.


And you're using the searched form, because you don't specify an expression on the CASE, just on the WHENs.
_________________
I am *not* the model of the modern major general.
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 » CASE Statement
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.