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
hsahay
Premium Member
Posts: 175 Joined: Wed Mar 21, 2007 9:35 am
Post
by hsahay » Wed Mar 09, 2016 5:19 pm
Hi
Functions like MAX, MIN, CEIL, FLOOR etc work on INT32 datatype.
What if my variables are larger than int32 ?
For example, the signature for MAX is
number1 (int32),number2(int32) returns int32
What if the values i need to compare are int64 ? or even Double. Are there no functions for larger data types than int32 ?
vishal
qt_ky
Premium Member
Posts: 2895 Joined: Wed Aug 03, 2011 6:16 am
Location: USA
Post
by qt_ky » Thu Mar 10, 2016 8:25 am
You will get incorrect results when using larger int64 values, when the arguments are expected to be int32. Test it out and see.
Ask IBM Support or the IBM DataStage Product Manager about it. Please let us know if you find anything out.
Choose a job you love, and you will never have to work a day in your life. - Confucius
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Thu Mar 10, 2016 8:29 am
The Server side of the world has "string" functions to do things like math on large numbers, is there any equivalent here?
-craig
"You can never have too many knives" -- Logan Nine Fingers
hsahay
Premium Member
Posts: 175 Joined: Wed Mar 21, 2007 9:35 am
Post
by hsahay » Thu Mar 10, 2016 9:45 am
Thanks QT_KY. That is precisely what has been happening with us. Overflow and data corruption all over the place. Which is what prompted me to ask this question.
Does anyone know of any options if one needs to use these functions on larger datatypes ?
vishal
hsahay
Premium Member
Posts: 175 Joined: Wed Mar 21, 2007 9:35 am
Post
by hsahay » Thu Mar 10, 2016 10:03 am
Chulett - Hi ! Can you please elaborate on that with examples ? Are you saying that there are string functions in server jobs that can be used for mathematical operations of the kind i mentioned in my original post ?
vishal
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Thu Mar 10, 2016 10:10 am
Those functions are documented in the BASIC manual and from what I recall are just for basic math: SADD, SSUB, SMUL and SDIV off the top of my aging head. I was just wondering if there is anything remotely similar on the PX side...
-craig
"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Fri Mar 11, 2016 3:01 pm
The parallel engine does not have the string math functions to which Craig referred.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
asorrell
Posts: 1707 Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas
Post
by asorrell » Fri Mar 11, 2016 4:08 pm
And if I remember correctly, the string math functions in the server jobs are VERY slow compared to normal math functions.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Fri Mar 11, 2016 4:29 pm
Sure... but you only used them on data that the 'normal' functions couldn't handle.
-craig
"You can never have too many knives" -- Logan Nine Fingers