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
highpoint
Premium Member
Posts: 123 Joined: Sat Jun 19, 2010 12:01 am
Location: Chicago
Post
by highpoint » Tue Jun 07, 2011 8:45 am
Hi,
I am reading from db2 table having column datatype of type double 8.
When i import table definitions the DataStage takes this as double 53.
When i query the table for the column i see values like
100
6.94391376623802
0.638014075806097
But when i see extracted data in a sequential file in unix i see data for
100 like this 1.00000000000000000E+02
0 like this 0.00000000000000000E+00
Help is appreciated how i get this as 100 and 0 as i see it in database.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Jun 07, 2011 9:52 am
First suggestion would be an exact search here for "scientific notation".
-craig
"You can never have too many knives" -- Logan Nine Fingers
highpoint
Premium Member
Posts: 123 Joined: Sat Jun 19, 2010 12:01 am
Location: Chicago
Post
by highpoint » Tue Jun 07, 2011 1:27 pm
Did search but could not find anything suitable for my needs.
I am thinking the only way i can do is to convert to a decimal.
I would like to know which function can be used. And what should be the length and precision of decimal in order not to truncate any data.
Appreciate help on this.
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Tue Jun 07, 2011 2:52 pm
These representations ARE decimal.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
highpoint
Premium Member
Posts: 123 Joined: Sat Jun 19, 2010 12:01 am
Location: Chicago
Post
by highpoint » Tue Jun 07, 2011 3:20 pm
I like then without the scientific notations.
Like this format 100 or 0.78558
Not with 10000E+2
Appreciate help.
SURA
Premium Member
Posts: 1229 Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney
Post
by SURA » Tue Jun 07, 2011 9:13 pm
"CAST " it.
DJRH
Premium Member
Posts: 23 Joined: Fri Jul 07, 2006 9:03 am
Location: Mississauga
Post
by DJRH » Wed Jun 08, 2011 11:27 am
I have a similar issue..can somebidy tell me if we can use a environment variable or some configuration setting , where we can fix this double column and the data read is corrrected.
Its not easy to cast every column in a job as we have lot of jobs in the project.
DJRH
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Wed Jun 08, 2011 4:40 pm
It's not difficult, it's merely tedious.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.