Hi ,
I had peculiar problem i had a date source
Source
COl1 COl2
Jan 22 2006 Jan 23 2007
Lookup
Start Dt End_dt
Jan 20 2005 1 Feb 2006
2 Feb 2006 1 March 2006
Source start_dt should increment 1 day till it falls outside of stat_dt and End_dt of lookup
Start dt End_dt
1 March 2006 to Jan 23 2007
Clear example
SOurce
Start_dt End_dt
01 Jan 2005 02 AUg 2006
Lookup
12 Feb 2004 12 Feb 2005
13 Feb 2005 13 Feb 2006
SInce source start_dt is falling between lookup start_dt and lookup end_dt it should increment itself till it falls outside of all the start_dt and end_dt of lookup.
It should give results
14 Feb 2006 02 Aug 2006
Loop
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Since you have not asked a question I will assume that you have a solution to the situation you describe. Can I therefore ask you to post that solution?
If you don't have a solution, can you post a question?
If you don't have a solution, can you post a question?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Loop
[quote="ray.wurlod"]Since you have not asked a question I will assume that you have a solution to the situation you describe. Can I therefore ask you to post that solution?
If you don't have a solution, can you post a question?[/quote]
I dont have the solution can anybody help me to implement forloop logic in my datastage job
If you don't have a solution, can you post a question?[/quote]
I dont have the solution can anybody help me to implement forloop logic in my datastage job
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What are the data sources containing these values? Whatever the case, you are going to need to write some code, since you are on version 6.
But please begin with an English language specification of the expected output from this processing.
But please begin with an English language specification of the expected output from this processing.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
lookup based on key,
after lookup, in transformer output link have a constraint
not(inputlink.notfound)
In keyexpression for st date just code If ((looup.enddate > source.stdate) and (looup.stdate <= source.stdate)) then"(looup.enddate +1)" Else source.stdate
for date comparisson just go for iconv and oconv function.
after lookup, in transformer output link have a constraint
not(inputlink.notfound)
In keyexpression for st date just code If ((looup.enddate > source.stdate) and (looup.stdate <= source.stdate)) then"(looup.enddate +1)" Else source.stdate
for date comparisson just go for iconv and oconv function.