Error while executing shell script from After-Job subroutine
Posted: Thu Oct 04, 2012 6:08 am
I am trying to a count check between records fetched from source table and records loaded to target table for an audit purpose. What I am trying to do is writing the record count from source and target to sequential files and run a diff command in the After-Job subroutine using ExecSH. But, I get an error as below:
When I run the job, I get warning as
SH: Syntax error at Line 1 : `if' is not matched.
My search in the forum did not fetch any specific solution. Apprecite your help!
Code: Select all
diff file1 file2; if [ $? == 0 ] then echo "Counts in sync" else exit -1 fi
SH: Syntax error at Line 1 : `if' is not matched.
My search in the forum did not fetch any specific solution. Apprecite your help!