Очень простой пример с составленными именами переменных, типами данных (все цифры для простоты), а также именами и сигнатурами процедур / функций:
create or replace procedure wrapper_proc as
-- define local variables; use appropriate data types!
l_input_1 number;
l_input_2 number;
l_output_1 number;
l_output_2 number;
l_result number;
begin
-- Step1: Call a procedure with the given input values and get the 2 output values.
l_input_1 := 42;
l_input_2 := 128;
your_proc (l_input_1, l_input_2, l_output_1, l_output_2);
-- l_output_1 and l_output_2 are not set by that first procedire
-- step2: Call the function with input parameters along with one of the output value from Step1(procedure call)
-- assuming same two original inuts, and one of the procedure outputs...
l_result := your_func (l_input_1, l_input_2, l_output_2);
--Step3: Extract the output value from the return value of Step2.
-- do something unspecified with l_result
dbms_output.put_line('Final result was: ' || l_result);
end;
/
Или если вы хотите передать входные значения в этопроцедура упаковки:
create or replace procedure wrapper_proc (
-- arguments; use appropriate data types!
p_input_1 number,
p_input_2 number
) as
-- define local variables; use appropriate data types!
l_output_1 number;
l_output_2 number;
l_result number;
begin
-- Step1: Call a procedure with the given input values and get the 2 output values.
your_proc (p_input_1, p_input_2, l_output_1, l_output_2);
-- l_output_1 and l_output_2 are not set by that first procedire
-- step2: Call the function with input parameters along with one of the output value from Step1(procedure call)
-- assuming same two original inuts, and one of the procedure outputs...
l_result := your_func (p_input_1, p_input_2, l_output_2);
--Step3: Extract the output value from the return value of Step2.
-- do something unspecified with l_result
dbms_output.put_line('Final result was: ' || l_result);
end;
/