SP2-0670: Internal number conversion failed even if I return a number [message #625564] |
Fri, 10 October 2014 05:02 |
|
prateetibasu
Messages: 1 Registered: October 2014
|
Junior Member |
|
|
Hi,
My shell script looks like
LOG_FILE="/o2/appl/cnvrtBkgsMonitor/logs/monNewCriticalRlocs.log"
echo "$`date +"%c"` : Starting monNewCriticalRloc" >> $LOG_FILE
export ORACLE_HOME=/opt/oracle/10.2.0.4
$ORACLE_HOME/bin/sqlplus -S 'ods_mon_usr/omu_O222R@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = o2uatdb11)(PORT = 1521))(CONNECT_DATA =(SERVICE_NAME =O2UAT_APP)))' <<EOF
VARIABLE return_cd number
VARIABLE error_msg VARCHAR2(255)
VARIABLE error_typ VARCHAR2(5)
SET PAGESIZE 0;
SET FEEDBACK OFF;
SET SERVEROUT ON;
DECLARE
O_NEW_REJECTION_COUNT NUMBER;
BEGIN
COUNTNEWCRITICALRLOC(O_NEW_REJECTION_COUNT);
:return_cd:= O_NEW_REJECTION_COUNT;
end;
/
print :return_cd
exit :return_cd
EOF
RETURN_CD=$?
echo "RETURN_CD="$RETURN_CD >> $LOG_FILE
if (( $RETURN_CD < 1 ))
then
echo "No new critical rlocs in the recent times " >> $LOG_FILE
exit 0
else
echo "Huuray!! New Critical Rlocs!!Total number of critical rlocs "$RETURN_CD >> $LOG_FILE
exit 1
fi
The called stored proc returns a number but still I get the following error
COUNTNEWCRITICALRLOC(O_NEW_REJECTION_COUNT);
*
ERROR at line 5:
ORA-06550: line 5, column 1:
PLS-00201: identifier 'COUNTNEWCRITICALRLOC' must be declared
ORA-06550: line 5, column 1:
PL/SQL: Statement ignored
SP2-0670: Internal number conversion failed
Usage: { EXIT | QUIT } [ SUCCESS | FAILURE | WARNING | n |
<variable> | :<bindvariable> ] [ COMMIT | ROLLBACK ]
|
|
|
|