Home » Infrastructure » Unix » Urgent Help
Urgent Help [message #98394] Fri, 10 September 2004 01:51 Go to next message
pulkit
Messages: 18
Registered: April 2004
Junior Member
HI,

I want to pass a parameter to a stroed procedure as out type variable from shell script.

How can i do it?

 

Pulkit
Re: Urgent Help [message #98397 is a reply to message #98394] Fri, 10 September 2004 10:11 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
I'm not sure I understand your question, but here is something to try. $xxx is the input from the shell yyy is the output from a function. $zzz catches the yyy value.
RETVAL=`sqlplus -s scott/tiger@dev <b><<</b>EOF
set serveroutput on
WHENEVER SQLERROR EXIT 1
declare
yyy varchar2(8);
begin
yyy := upper('$xxx');
dbms_output.put_line('the_result_is '||yyy);
end;
/
exit;
EOF`

echo $RETVAL
zzz=`echo $RETVAL | awk '{print $2}'`
echo $zzz
Previous Topic: How to Store a Table Filed Value to a UNIX Shell Variable
Next Topic: Unix Shell.
Goto Forum:
  


Current Time: Thu Mar 28 16:27:06 CDT 2024