Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Parameters in and out of unix shell to procedure help please ...
Thanks for the quick solution.
My problem is passing the parameter in and out to stored procedure not an sql script.
I want to be able to do the following:
#
IN_PARA='SOME VALUE IN'
#
env_var=`sqlplus -s username/password_at_service execute
stored_procedure($IN_PARA)`
I very much appreciate your help
With Thanks
Mujahid
Sybrand Bakker <postbus_at_sybrandb.demon.nl> wrote in message
news:955787019.13019.0.pluto.d4ee154e_at_news.demon.nl...
> simple,
> just use something like
> env_var=`sqlplus -s username/password_at_service @script`
>
> That is all!
>
> So change your stored procedure to exec a
> dbms_output.put_line(<variable>)
> and you should be set.
>
> Hth,
>
> Sybrand Bakker, Oracle DBA
>
> Mujahid Hamid <mujahid_at_pharmco.demon.co.uk> schreef in berichtnieuws
> 955784496.14109.0.nnrp-10.c2de4f17_at_news.demon.co.uk...
> > Hi All,
> >
> > I am calling a stored procedure from Unix shell.
> >
> > I can pass value to the procedure but I cannot return a
> > value back to the Unix and store it in Unix shell variable.
> >
> > Is there a way where I can return a value from a stored procedure
> > to Unix shell script and store it in the Unix shell variable
> >
> > Following is what I am trying to do.
> > I am stuck on this please help ....
> >
> > Many Thanks
> >
> > Mujahid
> >
> > #
> > IN_PARA='INPAR'
> > OUT_PARA=''
> > sqlplus -s username/password <<endsql
> > exec STORED_PROCEDURE($IN_PARA,$OUR_PARA);
> > endsql
> > #
> > echo 'Following are the Unix outputs'
> > #
> > echo $IN_PARA >> VALUE_PASSED.DAT
> > echo $OUT_PARA >> VALUE_RETURNED.DA
> >
> >
>
>
Received on Sat Apr 15 2000 - 00:00:00 CDT
![]() |
![]() |