Oracle timed task Job call stored procedure has return output parameters (with out parameters)
Because the foreground invokes a stored procedure that contains out parameters, it also wants to invoke the same stored procedure in the job, and does not want to remove the out parameter and re-build a stored procedure to be called by the job.
Although the out parameter does not have any meaning in the job, the following method is used to define the parameter variables before calling the stored procedure, considering that the program is the most simplified and does not duplicate the construction. The following s1,s2 are out parameters, we hope to help you.
Begin
Sys.dbms_job.submit (Job =: Job1,
what = ' declare s1 VARCHAR2 (200); S2 VARCHAR2 (200); Begin P_test.usp_test_jobincs (S1,S2); End; ',
Next_date = Sysdate,
Interval = ' sysdate+1/1440 ');
Commit
End
Oracle timed task Job call stored procedure has back output parameters (with out parameters)