Page 1 of 1

Problem with decimal data

Posted: Fri Sep 04, 2009 3:06 am
by swerajan
Hi
The file i am using in the ETL job is created by mainframes. I need to read a data in a particular column as decimal (15,2). The sample data is like 000000006043315. I need the data to be read as 0000000060433.15. But datastage is reading the same as 0000006043315.00 Please provide some valuable inputs for the same.

Posted: Fri Sep 04, 2009 3:25 am
by laknar
use substring function to extract

Code: Select all

decimalcolumn[1,11]:".":decimalcolumn[12,2]

Posted: Fri Sep 04, 2009 3:26 am
by Sainath.Srinivasan
Or divide by 100.

Posted: Fri Sep 04, 2009 3:51 am
by swerajan
thanx sainath.. :) it works

Posted: Fri Sep 04, 2009 3:52 am
by Sainath.Srinivasan
Then mark it as resolved.