Abs function issue

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
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Abs function issue

Post by scorpion »

Hi,

I am trying to use Abs() function to remove - symbols in the data,but when i am using this ,i am getting data issue.i.e. decimals are not coming.

for ex:

old data: -123.45

if i use Abs() i am getting new data like 123

can any one help me on this...?
Thanx&Regards
scorpion
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You will have trouble getting decimal places from the ABS function since it returns an integer result. I don't have the docs available but seem to remember that there was some decimal function that could do this, or you could do "ABS(In.Data*100)/100" for decimals variables with 2 places of precision.
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

Hi Arndw,

Thanks for the reply,I am not able to see your full message since i am not a premier member.

could you help me to reply the decima;l function again?


thanks for the help
Thanx&Regards
scorpion
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

Hi Arndw,

Thanks for the reply,I am not able to see your full message since i am not a premier member.

could you help me to reply the decima;l function again?


thanks for the help
Thanx&Regards
scorpion
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The Parallel Job Developer's Guide documents the "fabs" function, which will do exactly what you want.
Post Reply