You cannot use SQL.SQLCODE as return code for Unix. Return codes for unix have to be <= 127.
But try this:
PHP Code:sqlplus -s <<EOF1
$usr/$pwd
set serveroutput on feedback off verify off heading off echo off
whenever sqlerror exit 99;
exec cqt_proc_cdr_insert;
exit;
EOF1
if [ $? -ne 0 ]
then
echo "!error"
exit 1
fi
#go on within the unix script
..
![]()




Reply With Quote