From within a transaction you can change the flow of a transaction. The following series of diagrams illustrate how the flow changes from transaction to transaction depending upon the statements that you use.
The following diagram shows the flow of nested transactions. In this diagram, Transaction 1 is the parent of Transaction 2 (child), and Transaction 2 is the parent of Transaction 3 (child). The numbered arrows indicate the sequence of actions from one transaction to another.
The following diagram shows the flow of a nested transaction that also starts a new transaction using a TRANSFERCALL statement. In this diagram Transaction 1 is the parent of Transaction 2 (child), and Transaction 2 is the parent of both Transaction 3 (child) and Transaction 4 (child). The numbered arrows indicate the sequence of actions from one transaction to another.
The following diagram shows a scheduled batch transaction. Transaction 2 can run at any time and Transaction 1 continues to run with control passing to RULE3 after the SCHEDULE statement is issued. RULE3 does not wait for RULE2 to start and complete.