same hash file used for multiple lookup in 1 transform

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
JNG
Participant
Posts: 7
Joined: Fri Sep 10, 2004 8:38 pm

same hash file used for multiple lookup in 1 transform

Post by JNG »

Hi,

Is it possible to perform lookup against the same hash file using multiple input columns within a single transform?

I have a sequential file input with 2 amount fields and 2 different currency codes, and need to perform currency conversion. The hash file has the currency code, and the conversion rate. For amount A, I need to use currency code C1, and for amount B, I need to use currency code C2. If any of the currency code lookup fails, I need to use 'USD' as the default currency conversion.

Can I have 3 reference links from the same hash file, going into the same transform, like the following?

Code: Select all

    _______________ 
   | currency code | ---crncy1lkup -->
   | hash file     | ---crncy2lkup -->  TRANSFORM
   |_______________| ---USDlkup ----->  

Thanks.
Jen
KeithM
Participant
Posts: 61
Joined: Thu Apr 22, 2004 11:34 am
Contact:

Post by KeithM »

Yes you can lookup to the same hash file multiple times in the same transformation. You just need to have three links from the hash file to the transformation so that you can define each link. You will also have to define the output three times in the hash stage for each of the output links.
Keith
JNG
Participant
Posts: 7
Joined: Fri Sep 10, 2004 8:38 pm

Post by JNG »

Thanks Keith. It's asking for the file name for each output link. I suppose I can specify the same file name in each case?

Thanks.
Jen
Post Reply