02-26-2010
Here is one idea:
- inside your pl/sql code, use UTL_FILE package to write the value of the out parameter into a unix file
- from your shell script, read the value from the file
If you want to avoid writing the value to a file, you can write the output to stdout and use the back-quote operator in the shell script to assign the stdout value to some shell variable.
Thanks.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Here is a snippet of my code:
if
then
echo "\n Deleting all reports older than 24 hours. \n" >> $logfile
ls -l $FileName >> $logfile
... (1 Reply)
Discussion started by: mh53j_fe
1 Replies
2. Shell Programming and Scripting
Is it possible to pass unix shell arrays in Oracle stored procedure?
Is yes, how?
Thanks (6 Replies)
Discussion started by: superprogrammer
6 Replies
3. Shell Programming and Scripting
hai,
can anybody say how to call or to execute an oracle stored procedure in oracle from unix...
thanks in advance.... for ur reply....
by,
leo (2 Replies)
Discussion started by: Leojhose
2 Replies
4. Shell Programming and Scripting
Here's a shell script snippet.....
cd $ORACLE_HOME/bin
Retval=`sqlplus -s <<eof
$TPDB_USER/april@$TPD_DBCONN
whenever SQLERROR exit 2 rollback
whenever OSERROR exit 3 rollback
set serveroutput on
set pages 999
var status_desc char(200)
var status_code... (1 Reply)
Discussion started by: hidnana
1 Replies
5. Shell Programming and Scripting
Hi Guys,
I have a stored procedure which has 5 out parameters. I need to call the stored procedure from the script.
When i use the following in my script,
db2 "CALL FCFM.PART_MASTER_TMP($Return_code,$Message,$Message1,$SQL,$Load_count)" >> $LOG_FILE
I am getting an error..
Please... (1 Reply)
Discussion started by: mac4rfree
1 Replies
6. Shell Programming and Scripting
Hi
i am calling a stored procedure from unix shell like this call
test_proc('0002','20100218');
the stored procedure was giving output
like this dbms_output.put_line(' processed earlier');
i want to see the output in the unix shell where i called.
Thanks
barani (6 Replies)
Discussion started by: barani75
6 Replies
7. Shell Programming and Scripting
Hi,
Can you assist me in how to redirect the output of oracle stored procedure from unix script?
Something similar to what i did for sybase
isql -U$MYDBLOG -D$MYDBNAME -S$MYDBSVR -P$MYDBPWD -o$MYFILE<< %%
proc_my_test 8
go
%%
Thanks in advance - jak (0 Replies)
Discussion started by: jakSun8
0 Replies
8. Shell Programming and Scripting
How to call a stored procedure from shell program (1 Reply)
Discussion started by: noorm
1 Replies
9. Shell Programming and Scripting
I have written a stored procedure in oracle database, which is having a CLOB OUT parameter. How can i call this stored procedure from shell script and get the CLOB object in shell script variable? (0 Replies)
Discussion started by: vel4ever
0 Replies
10. Shell Programming and Scripting
Hi Everyone,
I want to create a script where i need to run the oracle stored procedure from unix script and get the output(sequence number ) into a variable which i will pass in my datastage job.
Below is my stored procedure:-
DECLARE
P_TRANSTYPE VARCHAR2(20);
... (4 Replies)
Discussion started by: prasson_ibm
4 Replies
LEARN ABOUT HPUX
xaddconnectionwatch
XAddConnectionWatch(3X) XLIB FUNCTIONS XAddConnectionWatch(3X)
NAME
XAddConnectionWatch - handle Xlib internal connections
SYNTAX
Status XAddConnectionWatch(display, procedure, client_data)
Display *display;
XConnectionWatchProc procedure;
XPointer client_data;
ARGUMENTS
display Specifies the connection to the X server.
procedure Specifies the procedure to be called.
client_data
Specifies the additional client data.
DESCRIPTION
The XAddConnectionWatch function registers a procedure to be called each time Xlib opens or closes an internal connection for the specified
display. The procedure is passed the display, the specified client_data, the file descriptor for the connection, a Boolean indicating
whether the connection is being opened or closed, and a pointer to a location for private watch data. If opening is True, the procedure
can store a pointer to private data in the location pointed to by watch_data; when the procedure is later called for this same connection
and opening is False, the location pointed to by watch_data will hold this same private data pointer.
This function can be called at any time after a display is opened. If internal connections already exist, the registered procedure will
immediately be called for each of them, before XAddConnectionWatch returns. XAddConnectionWatch returns a nonzero status if the procedure
is successfully registered; otherwise, it returns zero.
The registered procedure should not call any Xlib functions. If the procedure directly or indirectly causes the state of internal connec-
tions or watch procedures to change, the result is not defined. If Xlib has been initialized for threads, the procedure is called with the
display locked and the result of a call by the procedure to any Xlib function that locks the display is not defined unless the executing
thread has externally locked the display using XLockDisplay.
SEE ALSO
XConnectionWatchProc(3X), XRemoveConnectionWatch(3X), XProcessInternalConnection(3X), XInternalConnectionNumbers(3X)
X Version 11 Release 6 XAddConnectionWatch(3X)