Passing a value to stored procedure from unix shell script

Hi Dudes :slight_smile:

I want a unix shell script to pass value to SQL stored procedure.

Below is the procedure

declare
res varchar2(10);
begin
odm_load_check('PRE_SANITY',res);
dbms_output.put_line(res);
end;
 
select * from error_log;
 
truncate table error_log;
 
select * from test;
 

We have to pass the value to the below procedure in the procedure from a unix script.

odm_load_check('PRE_SANITY',res);

out put should be like this when we run the script:

enter the value:
value1 #we have to input this value

and then this value1 need to be passed to odm_load_check('PRE_SANITY',res); in the above procedure.Please help me , i need it very urgent :frowning:

at which place to pass value1 to the proc?

try something like:

echo 'Enter Value:'
read $val
sqlplus -s $USER/$PASS@SID <<END
odm_load_check('$val',res);
END