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 » NULLIF Function

Post new topic  Reply to topic
 NULLIF Function « View previous topic :: View next topic » 
Author Message
vadivel
PostPosted: Wed Oct 10, 2007 11:20 am    Post subject: NULLIF Function Reply with quote

Voyager

Joined: 05 Aug 2002
Posts: 79
Location: US

Hi,

I'm facing an issue with the NULLIF function, not sure if thats how the function works. I'm using WMB 5.0

When I do a NULLIF for a message set field which is defined as short, then the function returns NULL if the field value is '0', if it is a non-zero value then the function returns the value as such.

NULLIF(variable,'')
returns NULL if variable value is '0'
returns 1 if variable value is '1'

I've pasted the output from trace for reference


2007-10-10 14:55:16.989761 3944 UserTrace BIP2539I: Node 'TXX_WMB_AVIEXPAcknowledgeShipmentPUB00_001.MapAVIEXPToOAG': Finished evaluating expression 'NULLIF(AVIEXP.*:*[1].RECTIFIED_IND, '')' at (.TXX_WMB_AVIEXPAcknowledgeShipmentPUB00_001_MapAVIEXPToOAG.MapAVIEXP_To_OAGISCanonical, 473.8. This resolved to 'NULLIF(0, '')'. The result was 'NULL'.

Thanks in advance

Vadi
Back to top
View user's profile Send private message Yahoo Messenger
AkankshA
PostPosted: Wed Oct 10, 2007 7:49 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ak05880_.htm

from infocenter

The NULLIF function returns a NULL value if the arguments are equal; otherwise, it returns the value of the first argument.
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
vadivel
PostPosted: Thu Oct 11, 2007 5:54 am    Post subject: Reply with quote

Voyager

Joined: 05 Aug 2002
Posts: 79
Location: US

I too thought so, but I guess it behaves in a different manner if the input field that is being checked against is a short or long. I had pasted the out from broker trace in my earlier post to show how it gets evaluated.

This resolved to 'NULLIF(0, '')'. The result was 'NULL'.

-Vadi
Back to top
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Thu Oct 11, 2007 6:10 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you set the right properties on a message set, when MRM processes a "0" value in the physical message, it will create a NULL value in the logical message.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Oct 11, 2007 12:19 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Jeff is correct ( as usual ). The easiest way to do this is to exploit the automatic null processing features of the MRM parser. The exact settings depend on the physical format you are using ( CWF / TDS / XML ).
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Oct 11, 2007 12:24 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

kimbert wrote:
Jeff is correct ( as usual ).


If I'm correct 88% of the time, I consider that I'm doing very well for the day. I'm not nearly smart enough to manage 100%.
_________________
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 » NULLIF Function
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.