switch stage, case expressions

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
dsguyok
Premium Member
Premium Member
Posts: 24
Joined: Thu Jan 21, 2010 10:22 pm

switch stage, case expressions

Post by dsguyok »

Hi

Is it possible to implement the following in the Switch stage:

If the selector value is 2914, then send the row to link 0.
If the selector value is 2915, then send the row to link 1.
By default (ie anything else), send the row to link 2 which IS NOT a reject link.


Basically I don't want unhandled values to be sent to a reject link. So far I can only implement the first 2 parts using case statements.

Can this be done using the Switch stage?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There's no "otherwise" capability in the Switch stage.

However, there's nothing special about a reject link except that you can't work with the Mappings (and it causes a message to be logged if it's used). You can set the If Not Found property to Output and direct these rows to the reject link.

If you don't want to do that you'll need to investigate the Filter stage (or Transformer stage) instead.
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