Problem using unix command from execute command stage
Posted: Fri Jul 25, 2014 3:39 am
Hi All,
Scenario : I have to search a reject file in one of the unix path/directory after one job has run. If the reject file is present then the job sends a email notification to users with the reject file. If no reject file, then it sends a success email.
Solution: I have used Execute Command stage after my job runs in sequencer to achieve this. This stage has "find" in command line with proper path in paramters : /etldata/q2c01/error/ -name "Q2C_Rej_*" -ls | wc -l
Where Q2C_Rej_timestamp is my file name.
Also in Trigger tab i have mentioned the condition as:
Name Expression type Expression
Lnk_Rej_Notify ReturnValue-(Conditional) 0
Lnk_Rej_Notify ReturnValue-(Conditional) 1
But when I am trying to run the seq, it is aborting with error as below :
Command wc -l did not finish OK, reply = '1'
Unhandled failure (1) encountered executing command wc -l
Can anyone please help.
Thanks in advance.
Scenario : I have to search a reject file in one of the unix path/directory after one job has run. If the reject file is present then the job sends a email notification to users with the reject file. If no reject file, then it sends a success email.
Solution: I have used Execute Command stage after my job runs in sequencer to achieve this. This stage has "find" in command line with proper path in paramters : /etldata/q2c01/error/ -name "Q2C_Rej_*" -ls | wc -l
Where Q2C_Rej_timestamp is my file name.
Also in Trigger tab i have mentioned the condition as:
Name Expression type Expression
Lnk_Rej_Notify ReturnValue-(Conditional) 0
Lnk_Rej_Notify ReturnValue-(Conditional) 1
But when I am trying to run the seq, it is aborting with error as below :
Command wc -l did not finish OK, reply = '1'
Unhandled failure (1) encountered executing command wc -l
Can anyone please help.
Thanks in advance.