Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Unix shell script capturing return value of stored procedure

Unix shell script capturing return value of stored procedure

From: <kevinoleniczak_at_my-deja.com>
Date: Mon, 08 Jan 2001 18:16:55 GMT
Message-ID: <93d06b$v81$1@nnrp1.deja.com>

How do you write a shell script (ksh) to capture a return value from a stored function? If I have the following test fucntion...

FUNCTION TESTME ( inName in VARCHAR2 ) RETURN NUMBER IS
tmpVar NUMBER;
BEGIN
   tmpVar := 321;
   RETURN tmpVar;
END TESTME; And a script that looks like...

sqlplus user/pwd <<PROCESS
declare
proc number;
begin
proc := TESTME ('$file');
exit proc
end;
PROCESS echo $?

I get the value 0 back which is incorrect.

Any ideas?

Sent via Deja.com
http://www.deja.com/ Received on Mon Jan 08 2001 - 12:16:55 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US