Trigger in sequence not recognising the command output

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
mouni
Charter Member
Charter Member
Posts: 49
Joined: Tue Jul 11, 2006 11:30 pm

Trigger in sequence not recognising the command output

Post by mouni »

Hi

In the sequence trigger i'm specifying when the script output is "ERR-0099" by Execute_Command_0.$CommandOutput='ERR-0099'

But the trigger is not getting activated even when i see in logs messages like this
Output from command ====>
ERR-0099
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Re: Trigger in sequence not recognising the command output

Post by priyadarshikunal »

mouni wrote:Hi

In the sequence trigger i'm specifying when the script output is "ERR-0099" by Execute_Command_0.$CommandOutput='ERR-0099'

But the trigger is not getting activated even when i see in logs messages like this
Output from command ====>
ERR-0099
check for any unwanted character in the output

you can also try a combiation of field and convert functions.

Code: Select all

 field(convert(@FM,',', Execute_Command_0.$CommandOutput),',',1)='ERR-0099'
since I don't have access to datastage and I am unable to verify it please verify the syntax.
Last edited by priyadarshikunal on Tue Nov 25, 2008 3:11 am, edited 1 time in total.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Re: Trigger in sequence not recognising the command output

Post by priyadarshikunal »

mouni wrote:Hi

In the sequence trigger i'm specifying when the script output is "ERR-0099" by Execute_Command_0.$CommandOutput='ERR-0099'

But the trigger is not getting activated even when i see in logs messages like this
Output from command ====>
ERR-0099
check for any unwanted character in the output

you can also try a combiation of field and convert functions.

Code: Select all

 field(convert(@FM,',', Execute_Command_0.$CommandOutput),',',1)='ERR-0099'
since I don't have access to datastage and I am unable to verify it please verify the syntax.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's kind of overkill, one or the other should work but the basics are sound. The output is a dynamic array and what you are not seeing (or taking into account) are the Field Marks between the elements. Either remove them or just check the first element. Some examples below, not an exhaustive list.

Code: Select all

Convert(@FM,'',Execute_Command_0.$CommandOutput)='ERR-0099'

Field(Execute_Command_0.$CommandOutput),@FM,1,1)='ERR-0099'

Execute_Command_0.$CommandOutput<1>='ERR-0099'
I prefer the last one.
-craig

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