How to handle string"000000000000000000000000000"
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 77
- Joined: Tue Apr 14, 2009 4:03 am
How to handle string"000000000000000000000000000"
Hi ,
in my job input is a sequential file(output of some other job).One of the field is decimal(4,16).For null value this field takes "0000000000000"(16 zero).I need to handel this zero and make it as 0.Please advice me how to do this.
in my job input is a sequential file(output of some other job).One of the field is decimal(4,16).For null value this field takes "0000000000000"(16 zero).I need to handel this zero and make it as 0.Please advice me how to do this.
-
- Participant
- Posts: 42
- Joined: Mon Apr 21, 2008 1:49 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
All zeroes is not, by default, legal for Decimal data type.
There is something you can set (environment variable?) that allows DataStage to accept all zeroes for a decimal number.
There is something you can set (environment variable?) that allows DataStage to accept all zeroes for a decimal number.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's the fix_zero argument to the conversion functions.
Parallel Job Developer's Guide p628 wrote:By default decimal numbers comprising all zeroes are treated as invalid. If the string fix_zero is specified as a second argument, then all zero decimal values are regarded as valid.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 77
- Joined: Tue Apr 14, 2009 4:03 am