Problem with decimal data

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
swerajan
Participant
Posts: 42
Joined: Tue Aug 05, 2008 4:34 am

Problem with decimal data

Post 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.
laknar
Participant
Posts: 162
Joined: Thu Apr 26, 2007 5:59 am
Location: Chennai

Post by laknar »

use substring function to extract

Code: Select all

decimalcolumn[1,11]:".":decimalcolumn[12,2]
Last edited by laknar on Fri Sep 04, 2009 3:26 am, edited 1 time in total.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Or divide by 100.
swerajan
Participant
Posts: 42
Joined: Tue Aug 05, 2008 4:34 am

Post by swerajan »

thanx sainath.. :) it works
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Then mark it as resolved.
Post Reply