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
poornima.chandramouli
Participant
Posts: 42 Joined: Wed Dec 26, 2007 1:58 am
Location: India
Post
by poornima.chandramouli » Sun May 11, 2008 2:48 am
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 » Sun May 11, 2008 4:16 am
What was the return value from your job activity?
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Sun May 11, 2008 7:54 am
Field Marks in the dynamic array output. Try either:
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 » Tue May 13, 2008 1:18 am
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 » Tue May 13, 2008 1:38 am
I'll ask the question again - what was the output of the command activity. Please paste it, without editing.
mc_harsha
Premium Member
Posts: 32 Joined: Mon Mar 06, 2006 5:44 am
Location: bangalore
Post
by mc_harsha » Tue May 13, 2008 2:29 am
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
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue May 13, 2008 7:10 am
Guys, problem solved.
mc_harsha - please mark the post as Resolved.
-craig
"You can never have too many knives" -- Logan Nine Fingers