Home » Infrastructure » Unix » pass parameter from oracle to unix......
pass parameter from oracle to unix...... [message #97769] Thu, 16 January 2003 07:26 Go to next message
vicky
Messages: 14
Registered: October 2000
Junior Member
I m calling from Unix command the oracle
The oracle is executing the stored procedure ....

$ sqlplus -S username/password@servername @file.sql

The File has this content

DECLARE
P_ERROR_CODE VARCHAR2(1);
BEGIN
P_ERROR_CODE := NULL;
// CALL PROCEDURE AND PRINT ERROR CODE
PG_CRM_COMMON.PR_EIM_CLEAN('IMPORT','EIM_CAMP_CON',21000,21999,100000,P_ERROR_CODE);
dbms_output.put_line('The Error Code from The stored procedure is P_ERROR_CODE is '||P_ERROR_CODE);
EXCEPTION
WHEN OTHERS THEN
P_ERROR_CODE := '3';
END;

I have to get back the error code to unix for display
purpose and for some other further logic
can any body how to get back the error code(P_ERROR_CODE) from the oracle ..... to unix.

I tried the host command of oracle to get back to unix but it didn't worked out

I appreciate for earnest reply
thanx
Vicky
Re: pass parameter from oracle to unix...... [message #97787 is a reply to message #97769] Thu, 23 January 2003 12:44 Go to previous message
Rajesh K Jaiswal
Messages: 1
Registered: January 2003
Junior Member
set serveroutput on before executing the script. It will display the required dbms_output.
Thanks.
Previous Topic: Re: Installation of Oracle8i on Redhat 7.1
Next Topic: sql at % prompt
Goto Forum:
  


Current Time: Fri Mar 29 07:36:08 CDT 2024