Picking up the Right values n loading to DW

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
amitendra_amit
Participant
Posts: 27
Joined: Fri Jul 28, 2006 2:11 pm

Picking up the Right values n loading to DW

Post by amitendra_amit »

Hi All,

The Scenario is like the one given below......


OCI----->Transformer----->SQFS
....................^
.....................|
.....................|
.................Hash File ((( Hash File pointing to the transformer))))

Definition Of Metadata
--------------------------
OCI | Hash File | SQFS
----- ----------- ------
TR1(VarChar) | NUM(Might be 1,2,3) | d1---(Value=TR(NUM))
TR2(VarChar) |
TR3(VarChar) |
------------------------------------------------------------------------------------

Depending on the value returned from the Hash file .....

Say for Example NUM=2 ....Then Value in TR2 Should be returned to d1......

I can use the If...Then ....Else .....like

If (NUM=1) Then TR1...ElseIf(NUM=2)..... like that...
Actually there are TR1,TR2,TR3.......TR30...
So the If..Else...Then will be very long.....

Is There any other way through which i can work it out...


Please do suggest me other options....

Thank You,


Cheers!!!
AMit
Sunshine
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Write a routine and use a Case statement maybe :?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

Field("TR1|TR2|...|TR30", "|", TheNumber, 1)
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