Home » Infrastructure » Unix » How to read the out variables of a oracle stored procedure
How to read the out variables of a oracle stored procedure [message #110614] Wed, 09 March 2005 01:15 Go to next message
ramakro
Messages: 2
Registered: March 2005
Junior Member
IN the code given below, the procedure takes 1 IN param and outputs 2 params.
Now how will I catch them and use them in the Unix script?
When I am echoing the code and msgg in the script they are same as 10, "this is.."

And the error that occured while executing the script is--
SQL> SP2-0552: Bind variable "MSGG" not declared.
...
-----------------------
#!/bin/ksh

echo "script running.. Before SQL "
code=10
msgg="this is the error message"
echo $code ... $msgg

sqlplus usrname@string/password << SQLSTRING
exec pkg_name.procedure_LOG(10,:code,:msgg);
SQLSTRING

echo "SCRIPT.. AFTERSQL "
echo $code ... $msgg
--------------------------
I am lil new to programming in Unix. Would greatly appreciate any help. Thanks.
Re: How to read the out variables of a oracle stored procedure [message #110617 is a reply to message #110614] Wed, 09 March 2005 01:27 Go to previous messageGo to next message
ramakro
Messages: 2
Registered: March 2005
Junior Member
I am really sorry for this question.
Should have checked the previous forums first. Am right now doing that... I hope I can figure that out.

Re: How to read the out variables of a oracle stored procedure [message #110715 is a reply to message #110617] Wed, 09 March 2005 15:40 Go to previous message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
This should help: http://www.orafaq.com/faq/Operating_Systems/Unix/faq322.htm

Best of luck!

Frank
Previous Topic: How to run a unix shell script in the background?
Next Topic: SQLPLUS form UNIX KSH
Goto Forum:
  


Current Time: Tue Apr 23 02:46:26 CDT 2024