MVS Job - Rollback all the Inserts/Updates
Posted: Thu Nov 23, 2006 12:21 am
In MVS jobs, is there any way to ROLLBACK the ALL INSERTS/UPDATES made from job if any ONE OF THE INSERT/UPDATE FAILS?
For example:
From a main flow, I am trying to
1 - Insert db2 Table1
2 - Update db2 Table 2
3 - Insert db2 Table 3
My Insert 1 and Update was done successfully
BUT Insert 3 fails due to some reason.
Now I need to ROLL BACK the Insert 1 and Update 2.
It is noticed that the Insert 1 and Update was reflected in the respective table and JOB has finished with RC <> 0.
1. Can I implement within the MVS jobs? If yes, How to do it within MVS jobs?
OR
2 . Do I need to change the Generated COBOL Code for the Job?
For example:
From a main flow, I am trying to
1 - Insert db2 Table1
2 - Update db2 Table 2
3 - Insert db2 Table 3
My Insert 1 and Update was done successfully
BUT Insert 3 fails due to some reason.
Now I need to ROLL BACK the Insert 1 and Update 2.
It is noticed that the Insert 1 and Update was reflected in the respective table and JOB has finished with RC <> 0.
1. Can I implement within the MVS jobs? If yes, How to do it within MVS jobs?
OR
2 . Do I need to change the Generated COBOL Code for the Job?