|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Question on TDS Default Value |
« View previous topic :: View next topic » |
Author |
Message
|
vk |
Posted: Thu Mar 22, 2007 12:10 am Post subject: Question on TDS Default Value |
|
|
Partisan
Joined: 20 Sep 2005 Posts: 302 Location: Houston
|
Hi,
Is it possible to specify Null, Newline, Tab etc as the default values for an element in a TDS message set?
Per the manual, we can specify padding character as one of ('0', SPACE, NUL), any value within single quotes, or a hexadecimal value or unicode value. Alse delimiters can be set to <NUL>, <LF> etc. But the documentation does not say much about setting of default values for elements.
I am trying to set NUL value for a TDS fixed width element. If the element is of length 5, then the output should be (X'0000000000'). I have set the padding character as 'NUL' and default value as ' ' (SPACE).
If I assign a value of X'00' in ESQL, then I am getting proper output. But if I do not map the field in ESQL, then the default value of SPACE is assigned and then padded with NUL. Is there a way to specify the default value as NUL? I tried specifying NUL, X'00' etc as the default values, but it does not work as expected.
My broker is WMB v6.0.0.3
Thanks,
VK. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Mar 22, 2007 12:50 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
- In the element's TDS properties, set 'Encoding Null' to 'NullPadFill'
- Set the padding character to NUL
- In the message tree, ensure that the value of the element is NULL. |
|
Back to top |
|
 |
vk |
Posted: Thu Mar 22, 2007 1:08 am Post subject: |
|
|
Partisan
Joined: 20 Sep 2005 Posts: 302 Location: Houston
|
Hi Kimbert,
Encoding Null is set to 'NullPadFill' and Padding character is set to 'NUL'. But since the type is defined as FixedLength, if I do not specify a default value, then the message will error out while the output stream is being constructed.
If I assign a NULL value for the element in ESQL, I am getting the expected output. But I want the default value to take effect when I am not doing any mapping in ESQL.
Regards,
VK. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Mar 22, 2007 1:54 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Can you set the default value to '<NUL><NUL><NUL><NUL><NUL>'?
Or 0x0000000000? Not pretty, but it might work. |
|
Back to top |
|
 |
vk |
Posted: Thu Mar 22, 2007 3:14 am Post subject: |
|
|
Partisan
Joined: 20 Sep 2005 Posts: 302 Location: Houston
|
Hi Kimbert,
I had tried all those options. Whatever value specified as Default will come as such in the output. It will not be interpreted in any other manner as Padding Character or Delimiter.
So if we give the default value as '<NUL>', then the output will also have <NUL> for the field. It will not be converted into a NULL character.
Thanks,
VK. |
|
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
|
|
|
|