Function
The ALTER statement modifies one or more GO TO statements, thereby altering a predetermined sequence of operations.
Format
ALTER {procedure-name-1 TO [PROCEED TO] procedure-name-2}...
Syntax rules
procedure-name-1... must be names of paragraphs which contain only one sentence consisting of a GO TO statement without the DEPENDING phrase.
procedure-name-2... must be paragraph names or section names in the PROCEDURE DIVISION.
During the execution of the program, the ALTER statement modifies the GO TO statement specified under procedure-name-1... so that subsequent executions of the modified GO TO statement cause control to be transferred to procedure-name-2... (see section "GO TO statement").
General rules
A GO TO statement in a section whose segment number is greater than or equal to 50 must not be referenced by an ALTER statement in a section with a different segment number.
A GO TO statement in a section whose segment number is less than 50 may be referenced by an ALTER statement in any section, even if the GO TO statement thus referred to is contained in a program segment which has not yet been called for execution.