2else statements

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
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

2else statements

Post by scorpion »

Hi All,

Can any one explain,How to use 2 else statements in if-then-else statements in transformer stage.

reqrmnt is:

if columnA='DSX' then populate col1,else col2,else col3.

can any one please help me on this..
Thanx&Regards
scorpion
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can't have two 'else' statements in a single expression. Of course, you can have multiple else statements in multiple in-line expressions but each only has two halves. One 'if' and one 'else' per.

If you need to populate three different columns, simply use three appropriate expressions, one in each derivation.
-craig

"You can never have too many knives" -- Logan Nine Fingers
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

Hi Chullet,

Thanks for the reply,

And my reqrment is like:

if the value of the ColumnA = 'dsx' then populate TARCOL1,Else populate TARCOL2.if this column values is also null then populate TARCOL3.
Thanx&Regards
scorpion
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I know - I see now you already have a post on this very subject. Starting a second does nothing but cause unnecessart double-work.

Please use your original post to continue this conversation.
-craig

"You can never have too many knives" -- Logan Nine Fingers
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

Sure and I mentioned clearly now about my reqrmnt in my original post..

thanks
Thanx&Regards
scorpion
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Nothing about your requirement is clear or you'd have an answer by now. Let's stay back in your first post.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply