Sequence Nested_Condiiton

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
imfarhan
Participant
Posts: 53
Joined: Tue Jul 24, 2012 9:34 am

Sequence Nested_Condiiton

Post by imfarhan »

Hi All
I may be doing silly mistake, All I need simply to check the condition if toda'ys date = Monday or 2 then its move to next control and run the Job otherwise it pass value "No" I've used the following condition under expression.

Code: Select all

Name            = Yes
Expression Type = Customer-(Conditional)
Expression      =  If  Oconv(@DATE,'DW')  = 2 Then 'Yes'  Else 'No'
If I run today(Tuesday) the output of my expression should be "3" and it should go to Else condtion and stop the job but it move the next control to run the Job. Could you please advise how can I hand this conditon?

Appreciate your help in advance.
Kind regards,
Farhan
Farhan Syed
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The "expression" needs to evaluate to true or false and when it evaluates to true the trigger "fires". Without validating the syntax you are using, cut the expression back to something more like this:

Code: Select all

Oconv(@DATE,'DW') = 2
See if that works more better for you. If you still have issues, please spell them out for us, let us know what it is doing along with what it is you want it to do.
-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 »

Could I suggest, next time you review this expression, that you make it self-documenting? For example

Code: Select all

Oconv(@DATE, "DWA") = "MONDAY"
Using the weekday name rather than a number makes it clearer to the maintenance programmer what you intend(ed).
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