Very urgent please [message #296075] |
Thu, 24 January 2008 08:57 |
balajisundar
Messages: 29 Registered: October 2007
|
Junior Member |
|
|
Hi folks,
Im calling a sql script from an UNIX shell script. This particular sql script in turn calls a PL/SQL procedure inside a package. I'm now trying to pass the values that i have obtained in the SQL script back to Shell script. Could any one of you help me how this could be achieved.
I'm placing the codes for your reference
sqlplus -s XXXX/YYYY@$ABC_TOP/sql/new_oas_0069.sql
errorcode=$?
current_date_time=$?
#export LOG=$MISC/$current_date_time$SCRIPTNAME.log
export LOG=$MISC/$TEST$SCRIPTNAME.log
if [ $errorcode = 0 ]
then
echo 'new_oas_0069 has executed successfully'
new_oas_0069.sql code
WHENEVER SQLERROR EXIT 1
WHENEVER OSERROR EXIT 1
SET VERIFY OFF
SET HEADING OFF
SET FEEDBACK ON
SET TERMOUT ON
SET SERVEROUTPUT ON SIZE 25000
SET TIME ON
VARIABLE error_flag NUMBER;
VARIABLE current_date_time NVARCHAR2(100);
VARIABLE TEST NVARCHAR2(200);
BEGIN
:error_flag := 0;
:current_date_time:=null;
dbms_output.put_line(:error_flag);
test.AUTOMATION.new_oas_0069(:error_flag,:current_date_time);
dbms_output.put_line(:current_date_time);
END;
/
I want the current values of :error_flag and :current_date_time from sql script to be reflected in the shell script.
Any help in this regard is really appreciated.
Thanks,
Balaji
[Updated on: Thu, 24 January 2008 08:58] Report message to a moderator
|
|
|
|
Re: Very urgent please [message #296088 is a reply to message #296075] |
Thu, 24 January 2008 10:02 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
The only urgent thing in forum is to read OraFAQ Forum Guide.
Try to post in the correct forum maybe you'd have a faster answer.
Your previous question was "urgent please", this one is "very urgent please", I bet the next one will be "very very urgent please".
Regards
Michel
[Updated on: Thu, 24 January 2008 10:05] Report message to a moderator
|
|
|
|
|