Page 1 of 1

Type Conversion Problem

Posted: Sat Mar 01, 2008 8:02 am
by 199542
Hi ,
I am having data as below .....

abcd123457020080301470789

field delimiter is none .fixed width file .

actual metadata is as follows :

1st field 1-4 ---- abcd --- char

2nd field 5-11 ---- 1234570 -- number

3rd field 12-19 ---- 20080301 --- date

4th field 20-22 ----- 470 -- decimal (3,1) actual value is 47.0

5th field 23-25 ----- 789 ---number ----

While reading this file from a sequential file , If i am giving metadata as char for all fields , then only I am able to view data otherwise no .
When I am using char for all above fiels then 4th field is displaying like 470 instead of 47.0 .offcourse i can user transformer or modify and do necessary changes ..Other than that , Is there any way to handle it ??
The problem is I have some 150-180 fields , Its very difficult to again convert them in transformer stage .So , It should be handled in sequential file . I request you all to help me out in this problem .

Thanks in advance

Posted: Sat Mar 01, 2008 10:19 am
by kumar_s
You can specify the Integer (Number) and not as Decimal or without precision.