How to find the quotient and remainder at a time in datastag

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
DWH-M
Premium Member
Premium Member
Posts: 46
Joined: Thu Sep 06, 2007 5:26 am

How to find the quotient and remainder at a time in datastag

Post by DWH-M »

Hi All,

i have scenario like

600*2 --------------Stag1
Stag1-500----------Stag2
Stage2/Stag1------Stag3
Stag*100-----------Stag4



In this scenario, Stag2 always less than Stag1. How to get exact value?

Ex: 700/1200=0.58333333
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

2/3 returns recurring decimal. So not possible to find exact value.

Search for round_inf.
msuri
Participant
Posts: 4
Joined: Sun Jul 23, 2006 10:03 pm

Re: How to find the quotient and remainder at a time in data

Post by msuri »

Hi,

You have to call the all stagevariables as Decimal Then only u will get exact value


Regards
msuri
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The second person personal pronoun in English is spelled "you", not "u".

Please strive for a professional standard of written English on DSXchange, because even good English is difficult enough for those whose first language is not English, and because DSXchange is no an SMS-enabled device.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply