Author |
Message
|
WMB_User |
Posted: Thu Aug 18, 2011 1:06 pm Post subject: WTX - turn off suppression of leading zeroes |
|
|
Apprentice
Joined: 17 Nov 2008 Posts: 31
|
WTX 8.2.0.4
How do I maintain leading zeroes when mapping an input element defined as character to an output element defined as an integer? I'm using the TONUMBER function but haven't figured out a way to turn off the suppression of leading zeroes. The same conditon exists when the input element is defined as an integer and the output element is defined as an integer as well.
I've read the available WTX documentation and performed searches on the internet to no avail. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 18, 2011 7:42 pm Post subject: Re: WTX - turn off suppression of leading zeroes |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
WMB_User wrote: |
WTX 8.2.0.4
How do I maintain leading zeros when mapping an input element defined as character to an output element defined as an integer? I'm using the TONUMBER function but haven't figured out a way to turn off the suppression of leading zeros. The same condition exists when the input element is defined as an integer and the output element is defined as an integer as well.
I've read the available WTX documentation and performed searches on the internet to no avail. |
Is your input / output XML?
Why do you care about the leading zeros?
Did you specify a format on the xsd's for the XML?
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
WMB_User |
Posted: Fri Aug 19, 2011 6:54 am Post subject: |
|
|
Apprentice
Joined: 17 Nov 2008 Posts: 31
|
1. Both formats are XML.
2. I don't care about the leading zeroes, the vendor receiving the output does.
3. Not sure what you mean by format? If you mean a pattern restriction, then no, there's is none.
Thanks for the response. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 19, 2011 7:01 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
WMB_User wrote: |
1. Both formats are XML.
2. I don't care about the leading zeroes, the vendor receiving the output does.
3. Not sure what you mean by format? If you mean a pattern restriction, then no, there's is none.
Thanks for the response. |
If you want to keep leading zeros you need a pattern restriction or you need to set the field as string ...
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
WMB_User |
Posted: Fri Aug 19, 2011 7:09 am Post subject: |
|
|
Apprentice
Joined: 17 Nov 2008 Posts: 31
|
Yeah, I was kind of hoping to avoid changing the output element to a string.
Where would I apply the pattern restriction, on the output element? |
|
Back to top |
|
 |
Ric-Tic |
Posted: Fri Aug 19, 2011 7:38 am Post subject: |
|
|
Apprentice
Joined: 18 Nov 2003 Posts: 38 Location: Zurich, Switzerland
|
WMB_User wrote: |
Yeah, I was kind of hoping to avoid changing the output element to a string.
Where would I apply the pattern restriction, on the output element? |
The type tree defines the presentation of the element ie type, pad, size etc |
|
Back to top |
|
 |
|