How to stop the execution of a SQL program after running a batch file with host command which failed
I have a SQL program (not PL/SQL) executed from Oracle Concurrent Manager. In the middle of my SQL program, I runs a Unix Shell script with Host command.
What I want is: if the shell script returns an error, the request from Oracle Concurrent Manager will be terminated with an Error Status and the SQL program will be stopped.
In the below example: All the 'B' statements will not be executed if MyShellScript.sh fails.
Here is my SQL program:
statement_A1;
statement_A2;
host MyShellScript.sh
statemment_B1;
statement_B2;
exit;
Your help will be very appreciated. Thanks in advance.