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 » Comparison with ' ' (SPACE)

Post new topic  Reply to topic
 Comparison with ' ' (SPACE) « View previous topic :: View next topic » 
Author Message
raghubegur
PostPosted: Mon Apr 12, 2004 6:40 am    Post subject: Comparison with ' ' (SPACE) Reply with quote

Apprentice

Joined: 15 Jul 2002
Posts: 45

Hi,
We have a CWF Input MRM where some of the fields get spaces as their values from the input message.
To test if a particular field is filled with spaces, we used to do the TRIM and see if the result is NULL. That worked as expected.

But this also worked :
IF "InputBody"."MessageType1"."Field_x = ' '
then Field_x is filled with spaces irrespective of the length of the Field_x.

Can some one explain how this comparison with ' ' works ?
How is the comparison with fields greater than length 1 succeeding ?
_________________
Cheers
Raghu
Back to top
View user's profile Send private message Send e-mail
Missam
PostPosted: Mon Apr 12, 2004 10:39 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

May be the logical thinking of bunch of spaces alone is no way different than a single space leads to design the MRM like that.
I found the same thing as you when i'm working with TDS fixed length.
But the diiference is mine have a output MRM(TDS) format data.
i had a fixed length element of lets say 10.when i issue a statement like this
SET OutputRoot.MRM.Message.Field1 = ' ';

the output represents that the entire field length of 10 spaces.
because i want my work done by this.i didn't thought of digging into that.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Apr 13, 2004 1:11 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

In CWF and TDS, trimming is applied to input fields based on two properties:
CWF : String Justification and Padding Character
TDS : Justification and Padding Character

So your input fields may be getting trimmed automatically before they are put into the message tree. Check your CWF settings to see whether this is the case.

For TDS, the default padding character is SPACE, so that explains why Sam has seen his strings being trimmed automatically.
Back to top
View user's profile Send private message
wooda
PostPosted: Tue Apr 13, 2004 1:46 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

As kimbert said.

Only one correction.

Unlikme CWF, in TDS trimming does NOT happen automaticaly.
Trimming only occurs if the message set level TDS property
'Trim Fixed Len String' is not set to 'No Trim'.

The default value is 'No Trim'
And only one of the possible values will cause padding characters to be trimmed. 'Trim Padding chars'.
Other settings allow leading and/or trailing whitespace to be trimmed regardless of padding character.
Back to top
View user's profile Send private message
raghubegur
PostPosted: Tue Apr 13, 2004 10:54 am    Post subject: Reply with quote

Apprentice

Joined: 15 Jul 2002
Posts: 45

Thanks for the information.
If the input field is coming as spaces, the default trimming and padding make it equal to a ' '(single space).
Now if I move this value into an output field with length > 1 and "no padding", I should expect CWF errors.

I am away from my control center. I cannot test this today.
_________________
Cheers
Raghu
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Comparison with ' ' (SPACE)
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.