How to Pass the Output Values from the PL/SQL Procedure to Shell Script?

hi,

Could anyone tell me how to pass the output values of the PL/SQL procedure to Shell script and how to store that values in a shell script variable...

Thanks in advance...

There are a lot of threads regarding this topic, use the search function right above aand search for: sql shell variable

Thanks for your reply franklin i used the search function and found few post but in that i couldnt find how to pass the a Input to the procedure from shell script and get two outputs to the shell script...

below is my procedure

"CREATE OR REPLACE PACKAGE BODY ECONFIG.TRAINS_MGTS
AS
PROCEDURE ALL_TRAINS (
I_CLI_CODE IN NUMBER,
CLIENT_NAME OUT VARCHAR2,
CLIENT_STATUS OUT VARCHAR2) IS

BEGIN

SELECT A.CLIENT_NAME, A.CLIENT_STATUS INTO CLIENT_NAME, CLIENT_STATUS from ECONFIG.EC_CLIENT A where A.CLI_CODE =I_CLI_CODE ;
DBMS_OUTPUT.ENABLE;
DBMS_OUTPUT.PUT_LINE('OUR REQ CLIENT NAME IS: ' || CLIENT_NAME|| ' OUR SELECTED CLIENT STATUS IS: ' || CLIENT_STATUS);
END;
END TRAINS_MGTS;/"

kindly advice...

Hi

You can check the examples here for reference..connect to sqlplus and retrieve data and modify your criteria accordingly.

Guru.

thanks a lot guruprasad now i am able to establish connection with sqlplus but i am still not able to store the values of the procedure in a shell script variable...

Hi
Please provide us with what you have tried till now to help you better.

Guru.