| 
       
       
             | 
              | 
            
            
            
              
             
             
               
               
               
                  | 
                 
UGU: Unix Guru Universe - Unix Tip #4428- April 26, 2025
 -  Home : Help
 : Today's Tip
 Unix Tip #4428- April 26, 2025
 
OUT PARAMETER FROM ORACLE  
  
Ever wanted to execute an  
Oracle Procedure which contains  
an out parameter, and use the  
value returned from the out  
parameter in the shell variable.  
  
Try out this. The procedure  
test1 adds two nos. and returns  
output into the out parameter.  
  
export ORACLE_HOME=< type in your Oracle Home Path >  
export ORACLE_SID=< Mention the Oracle SID >  
export PATH=$ORACLE_HOME:$ORACLE_HOME/bin:$PATH  # This Path  
is set to access the sqlplus executable  
dummyvar=`sqlplus -s tcon4iqalib/tcon4iqalib  <
set pagesize 0 feedback off ver off heading off echo off  
serverout on  
variable verr_mesg number  
exec test1(4,5,:VERR_MESG)  
print verr_mesg  
exit;  
end`  
echo " Error is " $dummyvar  
echo " Result is " $dummyvar  
echo $dummyvar  
#end of shell script  
  
This tip generously supported by: ranjan.tridipta@citicorp.com  
 NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
production.
  
LAST 5 TIPS
 4427
 - VI COPING BETWEEN FILES
 4426
 - KILL REALLY DOES NOT KILL
 4425
 - XVI A FILE
 4424
 - CAT A BINARY FILE, OOPS!
 4423
 - WHERE WAS IT STARTED? 
 
I want to 
 SUBSCRIBE
 and get a UGU Tip everyday. 
I want to 
 UNSUBSCRIBE
 and NOT get a UGU Tip everyday.
 
If you have a UNIX TIP let us know, we just may use it:
(All tips become the property of the Unix Guru Universe)
                 
                  | 
                
                
                | 
                
               
                 |   | 
                
               
                   Copyright 1994-2024 Unix Guru Universe    | 
                
                
                | 
              
              
              | 
              | 
            
            
           
             |