Hello,
I have 4 set of datastage job, which is running in sequence to achieve the desire target valus....
(1) DB2 -->xfm--> Datasets,
(2) Datasets ---->join--->Datasets,
(3) Datasets ---> join-->xfm---> Sequential file
and then
(4) db2 loader to load to target db2 database.
When I check the Sequential file stage, the last one before running db2 loader, I have some decimal values (8,0) which is representing like "00000000."). This creating problem while loading to target database, I am getting error message "cannot be converted to
a PACKED DECIMAL value, but the target column is not nullable" and records are being dropped.
I am trying to convert "00000000." to "0" means supressing zeros so that I can load it to the target database.
Can anyone guide me how to achieve it?
Thanks,
Gaurav
packed decimal value, how to supress zeros
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 62
- Joined: Tue Sep 21, 2004 10:24 am
- Location: IBM - Chicago Area
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Zero is not valid to be represented as a packed decimal. Search the forum for "PACKED" "zero" (all terms) to find an environment variable that allows this behaviour to be overridden.
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.
-
- Premium Member
- Posts: 62
- Joined: Tue Sep 21, 2004 10:24 am
- Location: IBM - Chicago Area
you need to do two things .Gaurav.Dave wrote:Thanks Ray
Still I am not able find the solution. Wondering if I need edit properties for the perticular column (decimal one)..
Regards,
Gaurav
1> remove the "." from the string when writing it to the file.
2> by default "all zeroes" is not considered as a packed decimal value {atleast in datastage}. So you need to change some property in ur db so that it will accept it.