DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
pavankvk
Participant



Joined: 04 Dec 2003
Posts: 202

Points: 1536

Post Posted: Fri Sep 30, 2016 1:54 pm Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Server
OS: Unix
We have some server jobs migrated from 7.5 days and now in 11.5.0.1. these jobs were using drs plugin and now the drs connector replaced them.

this actually exposed a bug(?) in the basic transformer stage.

essentially we have 2 numeric fields define as 19,8. these will be multipled and result stored in another numeric field of 19,8


365.76000000*0.75357800*0.8

this results in 220.5029514240000000 and when writtent o Numeric 19,8 field in the transformer expect it to convert it to 220.50295142. however until its not written to a file or target database, the transformer doesnt seem to convert it.

when we write to a file, the value is 220.50295142, but when we write to target we get the error from odbc driver "String data, right truncate"

if we write to file and then read the file to load the same table using the same driver, it works fine.

is this a old bug? please let me know
Mike



Group memberships:
Premium Members

Joined: 03 Mar 2002
Posts: 1017
Location: Tampa, FL
Points: 6551

Post Posted: Fri Sep 30, 2016 2:47 pm Reply with quote    Back to top    

Bug? No. That is just the nature of server jobs.

There is no strong typing like you get in parallel jobs.

Everything in a server job is essentially a string. Conversion to and from a number is pretty fluid, and lengths don't really matter.

Add a number to a string:
Code:
"1" + 0


Concatenate a number with a string:
Code:
123 : "ABC"


DataStage BASIC is just fine doing that.

Data type and length restrictions only come into play when using a source or target stage that has stronger typing.

Mike
Rate this response:  
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42836
Location: Denver, CO
Points: 220819

Post Posted: Fri Sep 30, 2016 3:52 pm Reply with quote    Back to top    

Right. I don't recall where it is stored (uvconfig?) but the default maximum precision is 15 so that is probably coming into play here. Not something you just want to increase without making sure you know all the ramifications of doing so.

You can also look into the "string math" functions available in a Server job for doing math on those: SADD, SSUB, etc.

_________________
-craig

Your brain is full of spiders, you've got garlic in your soul, Mr. Grinch!
I wouldn't touch you With a thirty-nine-and-a-half foot pole!
Rate this response:  
pavankvk
Participant



Joined: 04 Dec 2003
Posts: 202

Points: 1536

Post Posted: Fri Sep 30, 2016 8:08 pm Reply with quote    Back to top    

thanks for your responses. at this point we will just go with offloading the data to a hashfile enforce data typing and then load the database from reading it in the same job. looks good so far
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours