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 » Why is fixed length field not enforced?

Post new topic  Reply to topic
 Why is fixed length field not enforced? « View previous topic :: View next topic » 
Author Message
pcelari
PostPosted: Tue Apr 20, 2010 5:38 am    Post subject: Why is fixed length field not enforced? Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

Hello,

I have a messgeset defined with both XML and binary formats, for easy transformation between implementations.

The binary format of all fields are fixed length string. I anticipate if the XML field text is larger than the fixed length specified in the messageset, upon parsing to binary format, the fields that exceed the length would be automatically truncated.

But it didn't. instead, result in field overflow upon parsing.

I feel I must have missed sth, but can't say exactly what. Can anyone please point out what I need to do to force the enforcement of the fixed-length?

thanks a lot for sharing your insight!


_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
Missam
PostPosted: Tue Apr 20, 2010 6:02 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

How is your entire message defined?

Is it a fixed length?

Because when ever your message element overflows. it will overflow to the next adjacent element and affect all the elements afterwards.

you can put a trace and see how your elements are displayed and the overflow one too.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Apr 20, 2010 7:00 am    Post subject: Re: Why is fixed length field not enforced? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pcelari wrote:
I anticipate if the XML field text is larger than the fixed length specified in the messageset, upon parsing to binary format, the fields that exceed the length would be automatically truncated.


Why did you anticipate that? I would have anticipated exactly what you've experienced.

How are you mapping between formats? Enforcement code needs to be placed there.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Apr 20, 2010 7:43 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You don't say what type of physical format you are using for your 'binary' format (TDS or CWF ). However, both of those physical formats have an option to truncate fixed-length strings on output.
Check out the infocenter, or take a look through the message set options ( the ones which apply to the entire message set ).
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Apr 20, 2010 8:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kimbert wrote:
However, both of those physical formats have an option to truncate fixed-length strings on output.


So I've learned something!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pcelari
PostPosted: Tue Apr 20, 2010 11:03 am    Post subject: Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

Hi Kimbert,

Thank you so much for sharing this. I found it, under messageSet.mset properties, Output settings.

With this, I would save a lot of coding with substring() functions.

again, many thanks!


_________________
pcelari
-----------------------------------------
- a master of always being a newbie
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 » Why is fixed length field not enforced?
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.