Sequencer Conditional flow not happenening

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
poornima.chandramouli
Participant
Posts: 42
Joined: Wed Dec 26, 2007 1:58 am
Location: India

Sequencer Conditional flow not happenening

Post by poornima.chandramouli »

Hi,

I've a requirement like if a count of a particular file is greater than 0 then my sequencer should abort.

So i placed a execute command activity & checking the count of the file by using the command wc -l & at the triggers part, i was giving the condition like if the command output is > 0 then it was connected to a mail notification stage followed by a termination activity.

As per the log the record count was fetched by the execute command activity,but the sequncer was not getting aborted.

awaiting for ur valuable reply.
Regards
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What was the return value from your job activity?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Field Marks in the dynamic array output. Try either:

Code: Select all

StageName.$CommandOutput<1> > 0
or

Code: Select all

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

"You can never have too many knives" -- Logan Nine Fingers
poornima.chandramouli
Participant
Posts: 42
Joined: Wed Dec 26, 2007 1:58 am
Location: India

Post by poornima.chandramouli »

I used the following command & it executed successfully,

StageName.$CommandOutput<1> >= 0

Thanks
Regards
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I'll ask the question again - what was the output of the command activity. Please paste it, without editing.
mc_harsha
Premium Member
Premium Member
Posts: 32
Joined: Mon Mar 06, 2006 5:44 am
Location: bangalore

Post by mc_harsha »

Check the return code of your unix command.

Unix command executed successfully will return '0', irrespective of your result(wc -l).
I hope this helps to solve the problem.
harshakumar mc
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Guys, problem solved. :?

mc_harsha - please mark the post as Resolved.
-craig

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