A subprogram, unless it has the INITIAL attribute, is left in its last-used state when it ends with EXIT PROGRAM or GOBACK. A subprogram that uses the EXIT PROGRAM statement with the AND CONTINUE RUN UNIT phrase is also left in its last-used state. The next time it is called in the run unit, its internal values will be as they were left, except for PERFORM statements, which are reset.
To reset the internal values of a subprogram to their initial state before it is called again, you must cancel the subprogram. Canceling the subprogram ensures that the next time the subprogram is called, it will be entered in its initial state.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.