Scope of control of an ON EXCEPTION statement
The scope of the ON EXCEPTION statement extends from the statement that immediately follows the ON EXCEPTION statement, and ends at the end of the statement block in which the ON EXCEPTION statement is issued. If the SPL routine includes no explicit statement blocks, the scope is all subsequent statements in the routine.
For the exceptions specified in the IN clause (or for all exceptions, if no IN clause is specified), the scope of the ON EXCEPTION statement includes all statements that follow the ON EXCEPTION statement within the same statement block. If other statement blocks are nested within that block, the scope also includes all statements in the nested statement blocks that follow the ON EXCEPTION statement, and any statements in statement blocks that are nested within those nested blocks.
201
occurs
in any of the indicated blocks, the action labeled a201 occurs.