4.7.3
ALTER
4-20
The ALTER statement modifies a predetermined sequence of operations.
ALTER procedure-name-l TO [PROCEED TO] procedure-name-2
[, procedure-name-3 TO [PROCEED TO) procedure-name-4] ...
Each procedure-name-l, procedure-name-3, ... is the name of a paragraph
that contains only one sentence consisting of a GO TO statement without the
DEPENDING option.
Each procedure-name-2, procedure-name-4, ... is the name of a paragraph
or section in the Procedure Division.
During execution of the object program, the ALTER statement modifies the
GO TO statement in the paragraph named procedure-name-l, procedure-
name-3, ... replacing the object of the GO TO by procedure-name-2,
procedure-name-4, ... , respectively.
Example:
ALTER CCl TO PROCEED TO CC5; CC5 TO PROCEED TO
FINAL-RESULT.
CCO.
ADD 001 TO COUNTR.
IF COUNTR IS LESS THAN OVFLW GO TO CC2.
CC1.
GO TO.
CC2.
MOVE CORRESPONDING INPUT-TABLE TO WORK-AREA.
ADD INPI OF WORK-AREA TO I-TOTAL.
ADD INP2 OF WORK-AREA TO P-TOTAL.
GO TO CCO.
CC5.
GO TO CCIO.
When the ALTER statement is executed, the paragraph name CC5 is inserted
as the object of the GO TO in paragraph CCl; and the paragraph name
FINAL-RESULT is inserted in place of CClO as the object of the GO TO in
paragraph CC5. FINAL-RESULT and CCIO must be procedure names in the
COBOL program.
60229400
Need help?
Do you have a question about the 3300 and is the answer not in the manual?