Someone help

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
shank
Participant
Posts: 18
Joined: Wed Mar 25, 2009 3:11 am

Someone help

Post by shank »

I have 2 files as follows

File1

Emp ID | Salary
1|30000
2|24000
3|9000
...
and so on.

File 2

Lower Salary Value | Higher Salary Value | Grade
25000|30000|A
20000|25000|B
5000|10000|C
...
and so on.

My output file should be something like..
Emp ID | Grade
1|A
2|B
3|C
..
and so on..

How can I achiece this without having a common key column in my input datasets?
Can anyone help?
Regards,
Shank
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Add integer key to both dataset and use lookup on the integer key and set multiple rows returned link to secondary link and send the output to transformer where add a constraint sal >= low sal and sal <= hi sal

Emp ID | Salary |Key
1|30000 |1
2|24000 |1
3|9000 |1

Lower Salary Value | Higher Salary Value | Grade |Key
25000|30000|A |1
20000|25000|B |1
5000|10000|C |1
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

Server or parallel job? You have posted in the server job forum but have marked the job type as parallel. The techniques are different in each.

The short answer in each case, though, is to add the common key within the DataStage job design.
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