In the shell script, I am calling a PLSQL stored procedure
sqlplus -s <<EOF
$v_fcp_login
set head off feed off serverout on size 1000000
exec XXIRIS_TEST_K.XXIRIS_TEST('$v_1',$v_2,$v_3,'$v_4',$v_5);
exit
EOF
But when there is an error in the plsql block, I need to error out shell script which is running as a host concurrent program in oracle but it is not doing so.
I am new to the shell script and any help is really appreciated.
eval
or run the script in a different manner —exec
will substitute that shell with the call, so exit can never be reached. And to only exit on error, assuming plsql has sane exit codes, use|| exit
at the end of the call. It will still probably be moot, since it will only exit the current shell and you seem to want one more. – lynxlynxlynx Sep 30 '13 at 20:27