In the seq file, will there be any loss of decimal values?

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
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

In the seq file, will there be any loss of decimal values?

Post by suresh_dsx »

Hi,

We are extracting data from db2 and using modify stage converting into string then finally loading into sequential file.
Job Design:

Db2 stage -->Modify stage -->sequential file stage

Source column name : Cust_amount
Datatype : Decimal (20,2)
Target column name : Cust_amount
Datatype : Varchar(25)

Modify stage specification:

Code: Select all

Cust_amount:string[max=25] = string_from_decimal [suppress_zero](Cust_amount)
Sample data

Sum of the column @ database level

1223454545903.30

Sum of the column @ file level (After loading into sequential file)

1223454545901.50

we observed loss of data at sum of the column not at the row level. we have get this value after loading into sequential file (1223454545903.30) but we are getting different values.

Tried the following other options

1. db2 stage --> seq file stage (we are seeing some difference)


Any greatly appricated.

Thanks
Suresh
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: In the seq file, will there be any loss of decimal value

Post by chulett »

suresh_dsx wrote:we observed loss of data at sum of the column not at the row level.
This implies an issue with however you are doing the "sum" of the file data... can you explain how you are doing that?
-craig

"You can never have too many knives" -- Logan Nine Fingers
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

Post by suresh_dsx »

First loading into a comma separated file then moving the file into windows through winscp then open with excel and sum of all the values (Format: number( -1234.10 with 2 decimal places)

Manually checking the total sum of the file.
Post Reply