The ALTER statement changes the transfer point specified in a GO TO statement.
ALTER Statement - Format
>>-ALTER-------------------------------------------------------->
.--------------------------------------------------------.
V |
>----procedure-name-1--TO--+------------+--procedure-name-2-+--><
'-PROCEED TO-'
The ALTER statement modifies the GO TO statement in the paragraph named by procedure-name-1. Subsequent executions of the modified GO TO statement(s) transfer control to procedure-name-2.
If procedure-name-1 or procedure-name-2 are within a declarative procedure, neither can reference any nondeclarative procedure. In the nondeclarative portion of the program, there must be no reference to procedure-names that appear in an EXCEPTION/ERROR declarative procedure, except that PERFORM statements may refer to an EXCEPTION/ERROR procedure or procedures associated with it.
Before the ALTER statement is executed, when control reaches the paragraph specified in procedure-name-1, the GO TO statement transfers control to the paragraph specified in the GO TO statement. After execution of the ALTER statement, however, the next time control reaches the paragraph specified in procedure-name-1, the GO TO statement transfers control to the paragraph specified in procedure-name-2.
Related Information:
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.