Description for max date

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

Post Reply
ghostraider
Premium Member
Premium Member
Posts: 49
Joined: Wed Dec 13, 2006 6:31 pm

Description for max date

Post by ghostraider »

I have the following data

Number
123
123
123
223
223
223
333
333

Date
2007-08-01
2007-08-01
2006-06-03
2007-07-31
2007-07-31
2006-06-06
2007-08-01
2007-08-01


So there are three fields altogether with another field GRADE. I look up this Grade with a Grade value from the hashed file. For each match of the number with the date i have to add a description. The thing here is a Number has two max dates.As of now using stage variables i am able to add a description for one Number with the Max Date but not the other one. Could someone let me know how this can be achieved.

output
123 2007-08-01 Desc
123 2007-08-01 Desc
123 2006-06-03 Null
223 2007-07-31 Desc
223 2007-07-31 Desc
223 2006-06-06 Null
|
|
so forth


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

Post by ray.wurlod »

More stage variables! You might also consider pre-loading a hashed file with the Max Date for each Number to make the comparison easier.
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