Hi,
I have column-x as decimal(21) in the source and decimal(21,4) in the target. I am reading it from ASCII format sequential file and storing into ASCII sequential file. This is nullable column and inside a source actualvalue for this column is .01. However, I am assuming that since I am reading this column as decimal(21), it should truncate the 0.01 and only pass the value before decimal to output column. But it is addting
0.01 also in the output. Can anyone tell me why this is happening? Is there anyway to ignore zero if we mention decimal(m,0)? I don't want DS should read any value after decimal since there is no scale in the source data type.
Thanks in advance
-Amit
Decimal value reading issue
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 38
- Joined: Fri Apr 22, 2005 6:07 am
-
- Premium Member
- Posts: 38
- Joined: Fri Apr 22, 2005 6:07 am
Hi All,
I am sorry issue is somewhat different here. I am reading from a sequential file in a decimal(21,2) data type column and storing into dataset with same decimal(21,2). In next job I am reading this dataset file and sending it to sequential file target through funnel a funnel stage. In dataset file I can see correct value 0000000000000009283.55, however, in output sequential file it is changing the value precesion it becomes 0000000000000009283.00. This column is nullable NO in the target and he field width set is 21 there. If I change the fieldwidth value from 21 to 23 I am able to see correct result. But other file which refering the same layout for reading data is giving import error. I have a dependency that other existing files are using the same metadata for reading a file and therefore can not change the field width freely. Can any one suggest me the way to correct it?
PS - RCP is disabled in this case.
Thanks
-Amit
I am sorry issue is somewhat different here. I am reading from a sequential file in a decimal(21,2) data type column and storing into dataset with same decimal(21,2). In next job I am reading this dataset file and sending it to sequential file target through funnel a funnel stage. In dataset file I can see correct value 0000000000000009283.55, however, in output sequential file it is changing the value precesion it becomes 0000000000000009283.00. This column is nullable NO in the target and he field width set is 21 there. If I change the fieldwidth value from 21 to 23 I am able to see correct result. But other file which refering the same layout for reading data is giving import error. I have a dependency that other existing files are using the same metadata for reading a file and therefore can not change the field width freely. Can any one suggest me the way to correct it?
PS - RCP is disabled in this case.
Thanks
-Amit