Sequencer Execute Command Activity

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
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

Sequencer Execute Command Activity

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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
-craig

"You can never have too many knives" -- Logan Nine Fingers
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

Post 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
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

Post 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.
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

Post 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.
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If that works for you, then it's just as 'right' as any other way.
-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 »

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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

Post 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
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

Post 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
Post Reply