Page 1 of 1

Trigger in sequence not recognising the command output

Posted: Tue Nov 25, 2008 1:23 am
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

Re: Trigger in sequence not recognising the command output

Posted: Tue Nov 25, 2008 3:10 am
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.

Re: Trigger in sequence not recognising the command output

Posted: Tue Nov 25, 2008 3:11 am
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.

Posted: Tue Nov 25, 2008 8:12 am
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.