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 » FIELDTYPE AND FIELDVALUE Usages

Post new topic  Reply to topic
 FIELDTYPE AND FIELDVALUE Usages « View previous topic :: View next topic » 
Author Message
goldym
PostPosted: Thu Jul 07, 2005 1:09 pm    Post subject: FIELDTYPE AND FIELDVALUE Usages Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

I was wondering if anyone had a similar problem.

I need to two checks

1. To see if an ELEMENT exists, if it doesn't write and exception
2. To see if the element exists, if it does, I need to check to see if there is a value there. I am usng FIELDTYPE and FIELDVALUE.

However I am getting the same results whether the element is there with a null value or not. Its skipping the first check (Error condition '2')

ESQL:

WHEN messageType = 'TEST' THEN

IF FIELDTYPE(cobDate) IS NULL THEN

SET exceptionType = '2';
SET exceptionDescription = 'Message header tags do not match structure';
CALL NULL_DUMMY(messageType );

ELSE IF FIELDVALUE(cobDate) IS NULL THEN
SET exceptionType = '3';
SET exceptionDescription = 'Message header field values are blank';
CALL NO_DUMMY(messageType)
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Jul 07, 2005 1:43 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I'm assuming "cobDate" is a reference to an element, or something?

Just check if it's NULL on it's own, don't bother with FIELDTYPE.

Or, heck, use COALESCE to assign a default value if it's null, and then see if the result is the default value. Covers both cases in one swoop.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
goldym
PostPosted: Thu Jul 07, 2005 1:49 pm    Post subject: Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

Will just checking to see if its null allow me to do two different exceptions. I have to check to see if its there, then if its there check to see if its null?
Back to top
View user's profile Send private message
Tibor
PostPosted: Thu Jul 07, 2005 2:56 pm    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

Can you post the whole code, especially the declaration and setting of variable cobDate?

Tibor
Back to top
View user's profile Send private message
goldym
PostPosted: Thu Jul 07, 2005 3:13 pm    Post subject: Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

I removed the REFERENCE variables and added the full Path. and the logic seemed to work.
Back to top
View user's profile Send private message
anpati1
PostPosted: Thu Jun 14, 2007 2:16 am    Post subject: Reply with quote

Novice

Joined: 07 Jun 2007
Posts: 24
Location: Marlow, UK

Im trying to evaluate if an element is empty or not. The help doc does not tell what the return value is for an empty element when I use FIELDVALUE() or COALESCE().
I'm working on XMLNSC domain message.

Thanks in advance,
Anand
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jun 14, 2007 6:26 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

There is a known issue with XMLNSC and empty elements.
See http://www.mqseries.net/phpBB2/viewtopic.php?t=36590 and several other posts on this subject.
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 » FIELDTYPE AND FIELDVALUE Usages
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.