|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
unexpected output |
« View previous topic :: View next topic » |
Author |
Message
|
dipankar |
Posted: Mon Apr 25, 2005 3:01 am Post subject: unexpected output |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Please see the following code-
IF ' ' = '' THEN
SET OutputRoot.XML.Empname = 'dipu';
ELSE
SET OutputRoot.XML.Empname = 'rajesh';
END IF;
I think it should return 'rajesh' as Empname in output.
But I get the reverse i.e.
<Empname>dipu</Empname>
Can anyone explain this? |
|
Back to top |
|
 |
PGoodhart |
Posted: Mon Apr 25, 2005 3:57 am Post subject: |
|
|
Master
Joined: 17 Jun 2004 Posts: 278 Location: Harrisburg PA
|
sorry _________________ Patrick Goodhart
MQ Admin/Web Developer/Consultant
WebSphere Application Server Admin
Last edited by PGoodhart on Mon Apr 25, 2005 4:09 am; edited 1 time in total |
|
Back to top |
|
 |
mgk |
Posted: Mon Apr 25, 2005 4:06 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
In ESQL the expression 'FRED' = 'FRED ' evaluates to TRUE, as trailing blanks are not treated as significant for comparison purposes.
Therefore, you are getting the correct answer. _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
dipankar |
Posted: Mon Apr 25, 2005 4:35 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Hi mgk,
you are absolutely right. I got your point.
Leading blanks are significant for comparison, not trailing blanks.
Thank you very much for your reply. I got some confusion which is now removed after getting your reply. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|