Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

ALTER statement

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

  1. procedure-name-1... must be names of paragraphs which contain only one sentence consisting of a GO TO statement without the DEPENDING phrase.

  2. procedure-name-2... must be paragraph names or section names in the PROCEDURE DIVISION.

  3. 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

  1. 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.

  2. 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.