Lookup in DS MVS Edition

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
rupeshg
Premium Member
Premium Member
Posts: 60
Joined: Thu Dec 22, 2005 6:02 am
Location: United Kingdom

Lookup in DS MVS Edition

Post by rupeshg »

Hi,

I have a senario, where I have to lookup 2 columns from table A with a single lookup table LK and get their corresponding values from that table. But as far as I know lookup can be done only on one value and not more than one. For example, my input table is

Column Value
----------------
lobcd BBB
trncd LLL


look up tables is

Column Value1 Value2
--------------------------
lobcd AAA XXX
lobcd BBB YYY
trncd CCC ZZZ
trncd LLL MMM


and the expected output from my look up is as follows

Column Value
----------------
lobcd YYY
trncd MMM


I am trying to look up based on the column name and the values in it and trying to get the corresponding output.

Could anyone please comment on whether this can be achieved by one look up or do i need to use lookup stage twice? Your feedback on this would be helpful. Thanks.

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

Post by ray.wurlod »

You should be able to lookup on more than one column. However, you may have to "lie" that they are all "Key" columns on the link connecting to the reference input. That is, in your case, declare both columns to be key columns.
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