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 » How to match against existence of a field in Route node?

Post new topic  Reply to topic
 How to match against existence of a field in Route node? « View previous topic :: View next topic » 
Author Message
pcelari
PostPosted: Mon Jan 05, 2015 12:31 pm    Post subject: How to match against existence of a field in Route node? Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

I wonder how to test the existence of a field before matching its value.

for example,

$Root/XMLNSC/COMPLAINT/VERSION testing existence.
$Root/XMLNSC/COMPLAINT/VERSION = 2

any insight would be appreciated.


_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Mon Jan 05, 2015 12:41 pm    Post subject: Re: How to match against existence of a field in Route node? Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

pcelari wrote:
I wonder how to test the existence of a field before matching its value.


what have you tried to figure that out ?


_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Mon Jan 05, 2015 1:32 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

If you mean that you want to take one route if a tag has a specific value, and another route if it simply exists, then code 2 tests.

If you want to test that it exists and has a specific value, then the test for the specific value will obviously fail if the tag does not exist.

Or are you asking a different question?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Mon Jan 05, 2015 2:33 pm    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

Vitor wrote:
If you want to test that it exists and has a specific value, then the test for the specific value will obviously fail if the tag does not exist.


I hope, his question is the one you've mentioned then following should be suitable.
It totally depends what he is looking for while checking the field for some value or if that exists at all and then do some logical comparison. Following will work in any case, I believe :

Code:
  IF FIELDTYPE(InputRoot.XMLNS.Message1.Name)
      IS NULL THEN
  // Name field does not exist, take error
  action....
  ... more ESQL ...
  ELSE
  // Name field does exist, continue....
  ... more ESQL ...
  END IF


Vitor wrote:
Or are you asking a different question?

Could be.


_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Jan 06, 2015 6:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

shashivarungupta wrote:
Following will work in any case, I believe :

Code:
  IF FIELDTYPE(InputRoot.XMLNS.Message1.Name)
      IS NULL THEN
  // Name field does not exist, take error
  action....
  ... more ESQL ...
  ELSE
  // Name field does exist, continue....
  ... more ESQL ...
  END IF


Not in a Route node it won't.....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pcelari
PostPosted: Tue Jan 06, 2015 6:39 am    Post subject: Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

Yes, this is exactly what I mean. Sorry for not being clear enough.


_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 06, 2015 8:26 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pcelari wrote:
Yes, this is exactly what I mean. Sorry for not being clear enough.


I was more worried I was answering a different question and providing an answer that was, at best, irrelevant.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » How to match against existence of a field in Route node?
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.