How to read the out variables of a oracle stored procedure [message #110614] |
Wed, 09 March 2005 01:15 |
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.
|
|
|
|
|