Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Return Code to UNIX from Procedure Package

133250Dec 5 2002
I've found examples where a 1-byte RC can be picked up by a UNIX shell script (in $?) but they involve a PL/SQL block and bind variable in the script itself. It appears I cannot use a bind variable in a Package because the compile fails (PLS-00049: bad bind variable). UNIX does find a RC value when I use RAISE_APPLICATION_ERROR( (-20000-744) - v_rc_255, 'Abnormal Termination.' ); where v_rc_255 is a PLS_INTEGER with value 255, but the value is not 255! Sometimes it is zero, other times 7.

Is there a practical way I can signal "Abnormal Termination" from any PL/SQL Package's Procedures/Functions to UNIX so I can send my shell script down the appropriate path?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2003
Added on Dec 5 2002
3 comments
717 views