return code from unix
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: return code from unix

Hybrid View

  1. #1
    Join Date
    Jan 2001
    Posts
    515
    If I have a stored procedure in oracle and I call it from a unix script, how do I pass the return_code(which is a out parameter in my procedure) to the unix script?

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Use the same logic as your previous question on this topic... http://www.dbasupport.com/forums/sho...threadid=14119
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Jan 2001
    Posts
    20
    Below is a copy of the code for passing the return code from oracle to unix. There are two input parameters and an out parameter in our procedure which we are trying to pass to the num variable in UNIX.

    Help! An error is given upon execution

    typeset num

    num=`sqlplus -s < ${USER}/${PASSWD}
    exec update_status($3,'sending',num);

    EOSQL
    `

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    I would change update_status to a function. Then, I would use something like:
    Code:
    num=`sqlplus -s ${USER}/${PASSWD} << EOSQL 
    exec dbms_output.put_line(update_status($3,'sending'));
    EOSQL 
    `
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

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