Sponsored Content
Top Forums UNIX for Dummies Questions & Answers capturing oracle procedure out param value Post 9182 by rwb1959 on Tuesday 23rd of October 2001 03:44:09 PM
Old 10-23-2001
Well, I don't know what your data types are but you should
be able to do...

#!/usr/bin/ksh

sqlplus -s scott/tiger@db << EOF > /tmp/result.$$
declare invar number;
declare outvar char(30);
exec myschema.mypkg.myproc(invar, outvar);
dbms_output.putline(outvar);
EOF

read result /tmp/result.$$
echo $result
rm -f /tmp/result.$$
exit 0

...If I thought about for a while, I could come up with
somthing much cleaner but you get the idea.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Oracle stored procedure.

I am using sqlplus. I have the stored procedure name. How can i print the stored procedure content? (2 Replies)
Discussion started by: kamil
2 Replies

2. UNIX for Dummies Questions & Answers

calling Oracle procedure from Unix

Does anyone know how to call an Oracle stored procedure from a Unix script? (1 Reply)
Discussion started by: ssmiths001
1 Replies

3. UNIX for Advanced & Expert Users

Capturing Oracle Shutdown error

Hi, Iam calling 3 sql scripts through one shell script 'rmia.sh'. Till now this was working fine, but last time while calling the SQL scripts, Oracle was down. But amazingly the exit status was '0' (success)!!! Below is the shell code: #!/usr/bin/ksh -x assign_file asql a.sql 1... (15 Replies)
Discussion started by: ganapati
15 Replies

4. Shell Programming and Scripting

How to execute an Oracle procedure using shell

Hi , i have created an .sh file that has the following code: #!/bin/ksh sqlplus -s p1istuat/p1istuat@CWS_IST6 @Procedure_Execute.sql & sqlplus -s p1istuat/p1istuat@CWS_IST6 << EOF exit EOF The mentioned Procedure_Execute.sql file inside has the following code: exec TEST; ... (5 Replies)
Discussion started by: vins_san
5 Replies

5. Shell Programming and Scripting

passing variable to oracle procedure

using the script below I want to pass a parameters thorugh my sql call(@/unixsxxx/xxxx/helpenv.sql emptab ) as input into an oracle procedure xxxx_package.proc1(%1,emptab); . I tried %1 but it does not work. Any suggestions. #!bin/ksh set -x # export... (0 Replies)
Discussion started by: TimHortons
0 Replies

6. Shell Programming and Scripting

Capturing output of procedure in variable in shell script

Hi guys I am calling one DB2 stored proc through unix. It is giving me below output. I want to capture the value 150 in one UNIX variable in shell script. Please let me know how I can achieve this. Thanks in advance Value of output parameters -------------------------- Parameter Name :... (5 Replies)
Discussion started by: vnimavat
5 Replies

7. Shell Programming and Scripting

Executing oracle procedure using cronjob

Hi, Below is the code to execute the procedure "dbms_job.broken" from the shell script. on executing manually, it works properly without any error. but it is not working when scheduled using the cronjob. #!/usr/bin/bash user_name="oracdb" password="ora123" tns="localdb"... (2 Replies)
Discussion started by: milink
2 Replies

8. Programming

Oracle Procedure approach

HI All , I am new to oracle procedures. Please help me for the approach to satify the requirement. I need to create procedures. with parameters passed ( say report,type,identities,country ) It should also call sql query within the procedures and passed parameters should be used in where clause... (2 Replies)
Discussion started by: Perlbaby
2 Replies

9. Shell Programming and Scripting

Processing values from Oracle procedure

Hi all, My oracle procedure returns more than one value. i need to get one value at a time upto ending value ina shell script. Please help me..... (9 Replies)
Discussion started by: pmreddy
9 Replies

10. Shell Programming and Scripting

Capturing Oracle SQL Error Codes

My issue pertains to earlier posts like exit unix script after sqlerror in procedure - dBforums SQLPLUS Error Capturing | Unix Linux Forums | Shell Programming and Scripting We are executing PL/SQL blocks from shell scripts using SQLPLUS. The error code has to be captured into a logfile that... (3 Replies)
Discussion started by: jerome_rajan
3 Replies
EIO_STATVFS(3)								 1							    EIO_STATVFS(3)

eio_statvfs - Get file system statistics

SYNOPSIS
resource eio_statvfs (string $path, int $pri, callable $callback, [mixed $data]) DESCRIPTION
eio_statvfs(3) returns file system statistics information in $result argument of $callback PARAMETERS
o $path - Pathname of any file within the mounted file system o $pri -The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. If NULL passed, $pri internally is set to EIO_PRI_DEFAULT. o $callback -$callback function is called when the request is done. It should match the following prototype: void callback(mixed $data, int $result[, resource $req]); o $data -is custom data passed to the request. o $result -request-specific result value; basically, the value returned by corresponding system call. o $req -is optional request resource which can be used with functions like eio_get_last_error(3) o $data - Arbitrary variable passed to $callback. RETURN VALUES
eio_statvfs(3) returns request resource on success or FALSE on error. On success assigns $result argument of $callback to an array. EXAMPLES
Example #1 eio_statvfs(3) example <?php $tmp_filename = '/tmp/eio-file.tmp'; touch($tmp_filename); function my_statvfs_callback($data, $result) { var_dump($data); var_dump($result); @unlink($data); } eio_statvfs($tmp_filename, EIO_PRI_DEFAULT, "my_statvfs_callback", $tmp_filename); eio_event_loop(); ?> The above example will output something similar to: string(17) "/tmp/eio-file.tmp" array(11) { ["f_bsize"]=> int(4096) ["f_frsize"]=> int(4096) ["f_blocks"]=> int(262144) ["f_bfree"]=> int(262111) ["f_bavail"]=> int(262111) ["f_files"]=> int(1540815) ["f_ffree"]=> int(1540743) ["f_favail"]=> int(1540743) ["f_fsid"]=> int(0) ["f_flag"]=> int(4102) ["f_namemax"]=> int(255) } PHP Documentation Group EIO_STATVFS(3)
All times are GMT -4. The time now is 01:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy