Hello All,
I am using the below syntax to call package in a unix shell script, is this right way of calling and checking for errors or is there any other better approach?? kindly suggest.
I am using Oracle 11g & Linux OS, SQL*Plus: Release 11.2.0.3.0 Production
RETVAL=`sqlplus -s FCSDWH_STG/${DBSTG}@${DBSRC} <<EOF
EXEC FCSDWH_STG.FCA_HASH_TOTALS_PKG.HASH_TOTALS_COMPUTE(${PROVIDER},${UNINUM},${EXTRACT_DT},${VER_NUM});
EOF`
if [ `echo ${RETVAL} | egrep "ERROR"` ]
then
logit "Error While Generating The SQLPLUS Output File, Please Check"
exit 1
else
logit "SQLPLUS Output File Has Been Generated Successfully"
fi
Thanks much.