Sequence check condition stage help

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
sigma
Premium Member
Premium Member
Posts: 83
Joined: Thu Aug 07, 2008 1:22 pm

Sequence check condition stage help

Post by sigma »

Hi

The output of my log for the execute command stage is

Seq_Madison_Customer_Master..JobControl (@Command_To_Chk_Rejects): Executed: wc -l /cdwdata/reject/pharma/madison/*Rejects.txt | grep total | awk '{print $1}'
Reply=0
Output from command ====>
0


Then I do a custom expression in the next check condition stage as in

Command_To_Chk_Rejects.$CommandOutput > 0


The problem is I still get a email as it seems to not pass this above condition

I think I am missing something basic woudl greatly appreciate any help

sigma
sigma
Premium Member
Premium Member
Posts: 83
Joined: Thu Aug 07, 2008 1:22 pm

Post by sigma »

The point is that it goes through to execute the notification stage when my output is 0 and I am telling it to send email only if the value is greater than 0

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

Post by chulett »

Output from the Execute Command stage is returned in a dynamic array, which means there's more to that zero than meets the eye. It's actually a zero followed by a Field Mark, which is why your test fails.

Couple of solutions. Either check just the first element of the array or remove the field mark. Trigger examples for both:

Code: Select all

Command_To_Chk_Rejects.$CommandOutput<1> > 0

Code: Select all

Convert(@FM,"",Command_To_Chk_Rejects.$CommandOutput) > 0
-craig

"You can never have too many knives" -- Logan Nine Fingers
sigma
Premium Member
Premium Member
Posts: 83
Joined: Thu Aug 07, 2008 1:22 pm

Post by sigma »

Thanks a lot for the reply

Convert(@FM,"",Command_To_Chk_Rejects.$CommandOutput) > 0 solution works

I will try and understand what it does but it seems to work

The other solution

Command_To_Chk_Rejects.$CommandOutput[1] > 0 does not seem to work

Thanks a lot again and I will consider this post closed

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

Post by chulett »

Check the one that "doesn't work" - you changed what I posted. Angle brackets, not square brackets.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sigma
Premium Member
Premium Member
Posts: 83
Joined: Thu Aug 07, 2008 1:22 pm

Post by sigma »

I did change it as the angle brackets would not compile

I will try it again and post here shortly

It would become red as an expression indicating something not syntactically right but maybe I missed something let

I will post backhere shortly
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What error did you get from the compiler when "it wouldn't compile"?

Instead of the angle bracket notation you can use a Field() function which is equivalent (that is, the delimiter is @FM).

Code: Select all

Field(Command_To_Chk_Rejects.$CommandOutput,@FM,1,1) > 0
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