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
Lookup in DS MVS Edition
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.