Does one use Post Process scripting or Post Condition checking?I have 3 SQL jobs in a workflow; all jobs execute Oracle package procedures - the first one returns an error_number (if set), the second raises an ORA error message (if error occurs), and the third job does some other processing Here's example code;
-- First job process
DECLARE
error_number VARCHAR2(1);
BEGIN
process_pkg.load_data(error_number);
END;
-- Second job process
BEGIN
process_pkg.validate_data;
END;
-- Third job process
BEGIN
process_pkg.process_data;
END;
What I would like to happen is; if the first job returns an error_number > 0 then abort the job and jobs 2 and 3 are blocked from running. If an unexpected Oracle error occurs before the procedure completes that the job aborts also. I want to be able to restart this first job after the issue has been fixed and allow jobs 2 and 3 a chance to execute. If first job returns error_number <= 0 then proceed as normal with jobs 2 and 3.
When job 2 executes; if it returns any Oracle error (ORA) then abort job and job 3 is blocked from running. Same as for the first job, I want to then be able to restart job 2 and continue.
Any suggestions on how I would check both error_number and possible ORA errors?
------------------------------
Newbie
------------------------------