is there any wrong in routine

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Who cares, we are having fun.
Mamu Kim
harithay
Participant
Posts: 106
Joined: Tue Dec 14, 2004 10:51 pm

Post by harithay »

Hi craig, thanks for you reply.
chulett wrote:Since we don't know for sure what you need, it either needs to look like this:

[code1]if (Fundname2 <> Fundname1 or Fundname1='') and DateGenericDateDiff(Date2, Date1) < 365 then 0 else TNAamount2-TNAamount1[/code]
or:

[code2]if Fundname2 <> Fundname1 or (Fundname1='' and DateGenericDateDiff(Date2, Date1) < 365) then 0 else TNAamount2-TNAamount1[/code]
One of the two should be what you had in mind.


my reuqirement is

the same fundname exists in source, normally for the same fundname the filing dates (number days differnce) is 6 months (180 days), but if the same fund name exists more than twice i need to calculte change in amount for fund name if the no of days is not lees than 365,

the expression what i have written(first code in ur suggetsion) in stage variable is not giving proper output.

the expression is chekcing for same fund name and but it is not checking dategenericdiffernce (date2,date1) <365 ,

is there any wrong date function.

if u need any clarifiction in understanding my problem, i will provide you.


thanks
Post Reply