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 » How to access field length in message set definition

Post new topic  Reply to topic
 How to access field length in message set definition « View previous topic :: View next topic » 
Author Message
pcelari
PostPosted: Tue May 10, 2011 7:03 am    Post subject: How to access field length in message set definition Reply with quote

Chevalier

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

Hello,

is it possible to access attributes in a message set definiton in the compute node?

Specifically, all fields in a message definition are fixed-length. I need to access the defined length at in a compute node, to ensure the lengths are padded with space to the desired length. The parser always trims all trailing spaces off.

Has anyone done this before?

thanks for sharing your insight!


_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Tue May 10, 2011 7:58 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 365
Location: Columbus, OH

What parser is trimming the spaces off?

The message definition itself should ensure that all the fields are fixed length and padded with spaces if you've configured it correctly.
Back to top
View user's profile Send private message
paintpot
PostPosted: Tue May 10, 2011 7:59 am    Post subject: Reply with quote

Centurion

Joined: 19 Sep 2005
Posts: 112
Location: UK

Your message set, if set up properly, will keep padding for fields if that is what you want.

snap!
Back to top
View user's profile Send private message
pcelari
PostPosted: Tue May 10, 2011 9:37 am    Post subject: Reply with quote

Chevalier

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

joebuckeye wrote:
The message definition itself should ensure that all the fields are fixed length and padded with spaces if you've configured it correctly.


that's not completely true, the parser fills in the padding characters only when writing out the message, not when reading it, where it trims all spaces off the tail.

here's from the document Version 7.0.0.2 | ad16100_ :
"When parsing an input message, the padding character is trimmed from the end of the string. Whether the string is trimmed from the left or the right is governed by the Justification property."
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue May 10, 2011 10:48 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So you are using the CWF format? It would have been helpful to have told us that in your first post. On the other hand, if you are not using CWF then that topic does not apply to you.

Have you tried setting Justification to 'None'?
Back to top
View user's profile Send private message
pcelari
PostPosted: Tue May 10, 2011 11:56 am    Post subject: Reply with quote

Chevalier

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

thank you kimbert, now I know I'll get a solution.

yes, I use CWF.

I tried to use "Not Applicable", (under v7. there is no "none" option.), but the toolkit doesn't take it. It keeps defaulting to "Left Justify"
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue May 10, 2011 12:33 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

May be a toolkit defect. I've checked in the source code, and the the CWF parser allows the 'None/Not applicable' option.
Back to top
View user's profile Send private message
paintpot
PostPosted: Wed May 11, 2011 7:02 am    Post subject: Reply with quote

Centurion

Joined: 19 Sep 2005
Posts: 112
Location: UK

pcelari wrote:
thank you kimbert, now I know I'll get a solution.

yes, I use CWF.

I tried to use "Not Applicable", (under v7. there is no "none" option.), but the toolkit doesn't take it. It keeps defaulting to "Left Justify"




Works for me in WMB 7.0.0.201 (latest) - no data loss at all, as expected, and as we said originally....
Back to top
View user's profile Send private message
pcelari
PostPosted: Wed May 11, 2011 7:16 am    Post subject: Reply with quote

Chevalier

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

which version of toolkit do you have?

I checked in both 6.1.0.6 and 7.0.0.2, "Not applicable" is accepted in neither of them.
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
paintpot
PostPosted: Wed May 11, 2011 8:56 am    Post subject: Reply with quote

Centurion

Joined: 19 Sep 2005
Posts: 112
Location: UK

7.0.0.201 - you can see this in IBM Installation Manager
it is the latest - which can be checked by updating your toolkit using the internet
(and I know u probably know all this, but just in case)

My test case was very simple but did work

Good luck
Back to top
View user's profile Send private message
pcelari
PostPosted: Mon May 16, 2011 11:13 am    Post subject: Reply with quote

Chevalier

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

thank you, paintpot. I'll try it and get back. really appreciated!
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
ganesh
PostPosted: Thu Apr 04, 2013 7:21 pm    Post subject: Reply with quote

Master

Joined: 18 Jul 2010
Posts: 294

I am unable to set the Justification value to Not Applicable, it keeps defaulting to Left Justify, has anyone had this issue?


Version: 7.0.0.3
Build id: 7.0.0.3-20110825_1025
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 » How to access field length in message set definition
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.