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 » CSD3 screws up NULL handling

Post new topic  Reply to topic
 CSD3 screws up NULL handling « View previous topic :: View next topic » 
Author Message
warrenpage
PostPosted: Wed Sep 04, 2002 8:50 am    Post subject: CSD3 screws up NULL handling Reply with quote

Acolyte

Joined: 19 Feb 2002
Posts: 56
Location: Australia

It appears to me after wasting much time that CSD3 changes the way ESQL functions handle NULL..

Prior to CSD3 the following code worked

SET OutputRoot.XML.root.E = COALESCE(SUBSTRING(InputRoot.XML.root.dontexist FROM 1 FOR 2),'default');

Now even though the SUBSTRING returns NULL, the COALESCE fails to set the output element to 'default'

E.g. The following code

SET OutputRoot.XML.root.A = 'Gday';
SET OutputRoot.XML.root.B = InputRoot.XML.root.dontexist;
SET OutputRoot.XML.root.C = COALESCE(InputRoot.XML.root.dontexist,'');
SET OutputRoot.XML.root.D = COALESCE(InputRoot.XML.root.dontexist,'default');
SET OutputRoot.XML.root.E = COALESCE(SUBSTRING(InputRoot.XML.root.dontexist FROM 1 FOR 2),'default');

is passed the messages <r><e1>Hi</e1></r>

It returns <root><A>Gday</A><C></C><D>default</D></root>

Note that Element E never gets set. I have attached the Trace below.

Also note that you used to be able to return NULL from a function which returns CHARACTERS. Now this is not allowed.


Executing statement 'SET OutputRoot.XML.root.A = 'Gday';' at (11, 1).
Assigning value ''Gday'' to field / variable 'OutputRoot.XML.root.A'.
Executing statement 'SET OutputRoot.XML.root.B = InputRoot.XML.root.dontexist;' at (13, 1).
Evaluating expression 'InputRoot.XML.root.dontexist' at (13, 29).
(13, 39) : Failed to navigate to path element because it does not exist.
Assigning NULL to 'OutputRoot.XML.root.B', thus deleting it.
Executing statement 'SET OutputRoot.XML.root.C = COALESCE(InputRoot.XML.root.dontexist, '');' at (15, 1).
Evaluating expression 'COALESCE(InputRoot.XML.root.dontexist, '')' at (15, 29).
Evaluating expression 'InputRoot.XML.root.dontexist' at (15, 3.
(15, 4 : Failed to navigate to path element because it does not exist.
Assigning value '''' to field / variable 'OutputRoot.XML.root.C'.
Executing statement 'SET OutputRoot.XML.root.D = COALESCE(InputRoot.XML.root.dontexist, 'default');' at (17, 1).
Evaluating expression 'COALESCE(InputRoot.XML.root.dontexist, 'default')' at (17, 29).
Evaluating expression 'InputRoot.XML.root.dontexist' at (17, 3.
(17, 4 : Failed to navigate to path element because it does not exist.
Assigning value ''default'' to field / variable 'OutputRoot.XML.root.D'.
Executing statement 'SET OutputRoot.XML.root.E = COALESCE(SUBSTRING(InputRoot.XML.root.dontexist FROM 1 FOR 2), 'default');' at (19, 1).
Evaluating expression 'COALESCE(SUBSTRING(InputRoot.XML.root.dontexist FROM 1 FOR 2), 'default')' at (19, 29).
Evaluating expression 'SUBSTRING(InputRoot.XML.root.dontexist FROM 1 FOR 2)' at (19, 3.
Evaluating expression 'InputRoot.XML.root.dontexist' at (19, 4.
(19, 5 : Failed to navigate to path element because it does not exist.
Node 'TestCoalesce.Compute1': Finished evaluating expression 'SUBSTRING(InputRoot.XML.root.dontexist FROM 1 FOR 2)' at (19, 3. This resolved to 'SUBSTRING(NULL FROM 1 FOR 2)'. The result was 'NULL'.

Message propagated to 'out' terminal of compute node 'TestCoalesce.Compute1'.
The MQ output node 'TestCoalesce.MQOutput1' attempted to write a message to the specified queue 'test2' connected to queue manager ''. The MQCC was 0 and the MQRC was 0.
Message successfully output by MQ output node 'TestCoalesce.MQOutput1' to queue 'test2' on queue manager ''.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kirani
PostPosted: Fri Dec 20, 2002 5:56 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

WMQI CSD4 Fixed this problem,
IY34949 - COALESCE INCORRECTLY RETURNS A NULL VALUE.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » CSD3 screws up NULL handling
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.