Otherwise option in constraints

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
sumesh.abraham
Participant
Posts: 153
Joined: Thu May 11, 2006 1:52 am
Location: Bangalore

Otherwise option in constraints

Post by sumesh.abraham »

Hi,

How can use the 'Otherwise' option in constraints?

Thanks,
Sumesh
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What 'otherwise' option would that be? Do you mean perhaps an 'else' in the constraint expression? An example or more detailed question would help here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sumesh.abraham
Participant
Posts: 153
Joined: Thu May 11, 2006 1:52 am
Location: Bangalore

Post by sumesh.abraham »

I have two output links and I've a constraint on each.

Say, for first output link, I mention that Len(cust_id)=0. If I want to write all records which fail this constraint to the other output link, instead of using a constraint such as Len(cust_id)<>0, do I have any other way to achieve the same.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ah... while you could mark the second as a Reject link, you probably don't want the warning that will log. For "Link2" use "Link1.REJECTED" as the constraint to catch everything that didn't go down Link1.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you do not wish to use the "Reject" capability, then you need to construct a constraint expression is the logical inverse of all other output links' constraint expressions, as you have noted.
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