passing a return value from Oracle to Unix
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: passing a return value from Oracle to Unix

Hybrid View

  1. #1
    Join Date
    Aug 2001
    Location
    Buffalo
    Posts
    13
    I have been running a function in Oracle that works fine. When I try to extract the return code to a variable called num in UNIX the variable never gets set to the return code from Oracle. The code I am using is below. I welcome any ideas or comments. Thanks

    typeset num



    export ORACLE_SID=CBTST

    num=`sqlplus -s << EOSQL
    ${FMGDBUSER}/${FMGDBPASSWD}
    set serveroutput on
    declare
    x number;
    begin
    x := UPD_FUNC(000046,'E');
    dbms_output.put_line(x);
    end;
    EOSQL
    `
    echo num=$num
    return 0

  2. #2
    Join Date
    Apr 2001
    Posts
    6
    Try putting a slash after the end; in your pl/sql block. I tried this and it worked. However it also displays PL/SQL procedure
    successfully completed as output. I don't know how to suppress that.

    Ravi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width