calling procedure from script

Hi All,

My script will call a storedprocedure

#!/bin/bash
#
# Script for ...........
. ../conf/setting.env # Environment file to set the DATABASE

#TODAY=`date '+%Y%m%d_%H'`
#echo TODAY = $TODAY

sqlplus -s $DATABASE <<EOF
spool $TRACKING_LOGDIR/CalcFreqPgsVues_H.log
exec CalcFreqPgsVues_H ('$TODAY');
commit;
exit;
EOF

cat $TRACKING_LOGDIR/CalcFreqPgsVues_H.log >> $TRACKING_LOGDIR/OFR_CalcFreqPgsVues_H.log

My last line in the script (cat command) is not executing....
I need to append my log files in the last line....Is it becos of exit command before that..? any suggestions to overcome this ?? Or Can i append log files inside sqlplus. ?

Thanks and Regards,

Hi, just leave the "exit" out - it should end the session on it's own. Maybe you test it and see if a session/applikation is still there, that is related to your script.

laters
Zaxxon

I tried to remove esit ...
but iam getting following error

PL/SQL procedure successfully completed.

Commit complete.

SP2-0042: unknown command "EOF" - rest of line ignored.
SP2-0042: unknown command "echo hai" - rest of line ignored.

sorry friend...
It s working for me ... thanks for the suggestion