Date format not matching when null is coming in date fied for the fixed width file, which is reading entire string as single fiels.
sample warning:
tfpDateProcess,0: Data string ' ' does not match format '%yyyy%mm%dd': an integer was expected to match tag %yyyy.
tfpDateProcess,0: Conversion error calling conversion routine date_from_string data may have been lost
Input string is like
04568444444 620101215A
04568444444 6xxxxxxxxA
i want to handle the null part of date with some default value.
Note:null is marked as xxxxxxxx
Null handling in fixed width file with
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 31
- Joined: Thu Jul 05, 2007 11:57 pm
- Location: India
- Contact:
Null handling in fixed width file with
Thanks
Sultan
Sultan
-
- Participant
- Posts: 31
- Joined: Thu Jul 05, 2007 11:57 pm
- Location: India
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In a fixed-width file format the entire field must be filled with the representation of NULL. That is, the Null Field Value property must contain the same number of characters as indicated by the Display Width property. In this case, the data type is Date, so the format string for date comes into play. Therefore xxxxxxxx is not accepted, but 99991231 would be.
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: 57
- Joined: Wed Oct 21, 2009 4:46 am
- Location: India
-
- Participant
- Posts: 53
- Joined: Fri Apr 18, 2008 8:13 am
- Location: United States
Null handling in fixed width file with
Hi Sultan,
You will have the NULL handling property in the source stage where you can set the default date (may be '19000101') and then try executing your job.
You will have the NULL handling property in the source stage where you can set the default date (may be '19000101') and then try executing your job.
Regards
Ajay
Ajay