Re: Passing return codes from PL/SQL to SQLPlus script to OS

From: <shubhobrotodey_at_gmail.com>
Date: Tue, 28 Mar 2017 11:09:22 -0700 (PDT)
Message-ID: <448c7164-32d5-433f-bbfc-e2a4f71dd7c8_at_googlegroups.com>


Hi,

I have a similar problem and a similar approach for the solution of the same. my code traps various exit codes for various conditions and stores the value to a local variable; i'm then passing it to a bind var which i am using to store the exit code. My code is some thing like,,,

variable errflag number
begin
variable vflag number;
if
cond 1
then
vflag:=1;
.
.
.
.
.

elsif
cond n
then
vflag:=n;
else
...do nothing..

end if;
:errflag:=vflag;
end;
/
exit :errflag

but i am getting the below error after running

SP2-0670: Internal number conversion failed Usage: { EXIT | QUIT } [ SUCCESS | FAILURE | WARNING | n |

       <variable> | :<bindvariable> ] [ COMMIT | ROLLBACK ]

any ideas??? :\ Received on Tue Mar 28 2017 - 20:09:22 CEST

Original text of this message