ALTER Statement
ALTER Statement - Format >>-ALTER--------------------------------------------------------> .--------------------------------------------------------. V | >----procedure-name-1--TO--+------------+--procedure-name-2-+-->< '-PROCEED TO-'
- procedure-name-1
- Must be a Procedure Division paragraph that contains only one sentence: a GO TO statement without the DEPENDING ON phrase.
- procedure-name-2
- Must be a Procedure Division section or paragraph.
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.
