Author |
Message
|
pcelari |
Posted: Tue May 10, 2011 7:03 am Post subject: How to access field length in message set definition |
|
|
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 |
|
 |
joebuckeye |
Posted: Tue May 10, 2011 7:58 am Post subject: |
|
|
 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 |
|
 |
paintpot |
Posted: Tue May 10, 2011 7:59 am Post subject: |
|
|
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 |
|
 |
pcelari |
Posted: Tue May 10, 2011 9:37 am Post subject: |
|
|
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 |
|
 |
kimbert |
Posted: Tue May 10, 2011 10:48 am Post subject: |
|
|
 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 |
|
 |
pcelari |
Posted: Tue May 10, 2011 11:56 am Post subject: |
|
|
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 |
|
 |
kimbert |
Posted: Tue May 10, 2011 12:33 pm Post subject: |
|
|
 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 |
|
 |
paintpot |
Posted: Wed May 11, 2011 7:02 am Post subject: |
|
|
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 |
|
 |
pcelari |
Posted: Wed May 11, 2011 7:16 am Post subject: |
|
|
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 |
|
 |
paintpot |
Posted: Wed May 11, 2011 8:56 am Post subject: |
|
|
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 |
|
 |
pcelari |
Posted: Mon May 16, 2011 11:13 am Post subject: |
|
|
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 |
|
 |
ganesh |
Posted: Thu Apr 04, 2013 7:21 pm Post subject: |
|
|
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 |
|
 |
|