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 » General Discussion » How to check null values in XML message from the ESQL

Post new topic  Reply to topic
 How to check null values in XML message from the ESQL « View previous topic :: View next topic » 
Author Message
venuprsd
PostPosted: Thu Apr 28, 2011 12:00 pm    Post subject: How to check null values in XML message from the ESQL Reply with quote

Apprentice

Joined: 15 Aug 2010
Posts: 44

Hello Experts,

I am having XML data. From that I am getting one null tag. If any one of the TAG is null i need to some operation.

for ex:
<x>123</x>
<y></y>
<z>567</z>

From the above Y tag is null.How can i check that from the ESQL.I used FIELDTYPE, FILED VALUE but not working.Could you please help me because this is urgent deliverable.

Thank you.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Apr 28, 2011 12:25 pm    Post subject: Re: How to check null values in XML message from the ESQL Reply with quote

Grand High Poobah

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

venuprsd wrote:
From the above Y tag is null.How can i check that from the ESQL.


Well I'd have thought something like this utterly untested segment:

Code:


IF InputRoot.XMLNSC.y IS NULL THEN



would work, depending on if the tag is null or empty. You could also use LENGTH(FIELDVALUE(y)) > 0

(I assume you didn't actually try to use a function called FILED VALUE...)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Fri Apr 29, 2011 2:56 am    Post subject: Re: How to check null values in XML message from the ESQL Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

venuprsd wrote:

From the above Y tag is null.


Really? I thought it was the empty string.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Apr 29, 2011 5:33 am    Post subject: Re: How to check null values in XML message from the ESQL Reply with quote

Grand High Poobah

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

WMBDEV1 wrote:
venuprsd wrote:

From the above Y tag is null.


Really? I thought it was the empty string.


You too eh??
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Apr 29, 2011 10:54 am    Post subject: Re: How to check null values in XML message from the ESQL Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
WMBDEV1 wrote:
venuprsd wrote:

From the above Y tag is null.


Really? I thought it was the empty string.


You too eh??


Maybe someone could explain the VALUE of this debate.
Back to top
View user's profile Send private message
flahunter
PostPosted: Mon May 02, 2011 6:24 pm    Post subject: Re: How to check null values in XML message from the ESQL Reply with quote

Acolyte

Joined: 30 Oct 2008
Posts: 62

Quote:
From the above Y tag is null

I don't think so.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon May 02, 2011 8:33 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

It all depends on your definition of null and if you consider the 4 following cases to be equivalent:
Code:

<mntag/>
<mntag></mntag>
<mntag xsi:nil="true" />
<mntag xsi:nil="true"></mntag>


Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mattfarney
PostPosted: Tue May 03, 2011 4:33 pm    Post subject: Reply with quote

Disciple

Joined: 17 Jan 2006
Posts: 167
Location: Ohio

I think you want to use:

Code:
IF FIELDVALUE(InputRoot.XMLNSC.y) IS NULL THEN
  **do something**


-mf
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 » General Discussion » How to check null values in XML message from the 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.