This can help you. I assume you are runnig a batch program. When you send your first SQL instruction DB2 starts a LUW than only ends with a COMMIT, ROLLBACK, END OF PROGRAM or ABEND. If the program abens automatically you must have an USER EXIT ROUTINE that will execute a new program which will delete the rows updated in table A based on this predicate DELETE FROM TABLE A WHERE <date-column> = <your criteria>.
To keep the rows inserted in table B you must send a COMMIT after each one of the inserts in order to start a new LUW, this is the only way to keep the information in other case if the program abends all tre rows will be ROLLBACKed. Please note that sending a COMMIT additionally will UPDATE te rows inserted in table A.
If you can provide me more information (like the ABEND condition) I can give you a more accurate solution.