Page 1 of 1

Sequencer Execute Command Activity

Posted: Fri Feb 08, 2008 4:54 pm
by just4u_sharath
My job has a execute command activity connected to notification activity.
I am couting number of lines in a file. This file name is passed as parameter in the execute command activity. If the count is more than 1, then i have to notify a team. So in the triiger expression type of execute command activity i am using Stage_name.$commandOutput > 1.Expression is 'CUSTOM". When i run the job and peek into Director, i can see the command output is greater than 1 but the frustrating part is notification activity is not executed. Trigger Expression not working? Please help

Posted: Fri Feb 08, 2008 5:03 pm
by ray.wurlod
Did you select the activity variable from a menu (expression editor) or type it in?

The correct activity variable name has the name of the Execute Command activity, then a dot, then $CommandOutput (note the capital "C").

Incidentally, the correct terminology is "job sequence". A Sequencer is a component that you can use in a job sequence to bring streams of processing together.

Posted: Fri Feb 08, 2008 5:17 pm
by chulett
I'm sure you'll need to take the extra step to remove any 'Field Marks' from the output. So, either an ERplace or Convert to strip them before the check or...

Code: Select all

Stage_name.$CommandOutput<1> > 1

Posted: Fri Feb 08, 2008 6:20 pm
by just4u_sharath
chulett wrote:I'm sure you'll need to take the extra step to remove any 'Field Marks' from the output. So, either an ERplace or Convert to strip them before the check or...

Code: Select all

Stage_name.$CommandOutput<1> > 1
what are these field marks. why they appear in the output. Please explain if you dont mind. I hope this is the case happening with me in my sequence

Posted: Fri Feb 08, 2008 6:24 pm
by just4u_sharath
chulett wrote:I'm sure you'll need to take the extra step to remove any 'Field Marks' from the output. So, either an ERplace or Convert to strip them before the check or...

Code: Select all

Stage_name.$CommandOutput<1> > 1
what are these field marks. why they appear in the output. Please explain if you dont mind. I hope this is the case happening with me in my sequence.
Stage_name.$CommandOutput<1> > 1. Can i use this code eventhough is the output value is other than 1.

Posted: Fri Feb 08, 2008 6:27 pm
by just4u_sharath
chulett wrote:I'm sure you'll need to take the extra step to remove any 'Field Marks' from the output. So, either an ERplace or Convert to strip them before the check or...

Code: Select all

Stage_name.$CommandOutput<1> > 1
what are these field marks. why they appear in the output. Please explain if you dont mind. I hope this is the case happening with me in my sequence.
Stage_name.$CommandOutput<1> > 1. I tried to use this same code, but issues an expression expected error. I am using the activity variable stage_name.$CommandOutput.

Posted: Fri Feb 08, 2008 8:10 pm
by just4u_sharath
chulett wrote:I'm sure you'll need to take the extra step to remove any 'Field Marks' from the output. So, either an ERplace or Convert to strip them before the check or...

Code: Select all

Stage_name.$CommandOutput<1> > 1
I have done that by using Trim(Stage_name.$CommandOutput) >=1. It looks working. is this the right way to do it

Posted: Fri Feb 08, 2008 11:31 pm
by chulett
If that works for you, then it's just as 'right' as any other way.

Posted: Sat Feb 09, 2008 12:05 am
by ray.wurlod
Line terminators in the command output are converted to field marks and the entire result is presented as a single string. It does not matter whether the operating system is UNIX or Windows; this technique is consistent across platforms and thereby allows for portability.

A field mark can be accessed as the system variable @FM.

You've actually been lucky to get away with what you've done, since the logic of your expression is satisfied by "1~" or "2~" etc. (where I've used "~" to represent a field mark).

Posted: Sat Feb 09, 2008 1:34 am
by just4u_sharath
ray.wurlod wrote:Line terminators in the command output are converted to field marks and the entire result is presented as a single string. It does not matter whether the operating system is UNIX or Windows; this technique is consistent across platforms and thereby allows for portability.

A field mark can be accessed as the system variable @FM.

You've actually been lucky to get away with what you've done, since the logic of your expression is satisfied by "1~" or "2~" etc. (where I've used "~" to represent a field mark).
So we can eliminate filed marks using a Trim function. Can we do the same by using any other alternate like using transformer function. What is the character that represents field mark. If the output is 1 from command, then it will be like '1~' always or it can be '1&' can be '1$'. Actually which character representsw fieldmark, Item mark, Value mark

Posted: Sat Feb 09, 2008 1:35 am
by just4u_sharath
ray.wurlod wrote:Line terminators in the command output are converted to field marks and the entire result is presented as a single string. It does not matter whether the operating system is UNIX or Windows; this technique is consistent across platforms and thereby allows for portability.

A field mark can be accessed as the system variable @FM.

You've actually been lucky to get away with what you've done, since the logic of your expression is satisfied by "1~" or "2~" etc. (where I've used "~" to represent a field mark).
So we can eliminate filed marks using a Trim function. Can we do the same by using any other alternate like using transformer function. What is the character that represents field mark. If the output is 1 from command, then it will be like '1~' always or it can be '1&' can be '1$'. Actually which character representsw fieldmark, Item mark, Value mark