COBOL Manual for TNS/E Programs (H06.03+)
Procedure Division Verbs
HP COBOL Manual for TNS/E Programs—520347-003
9-72
GO TO
GO TO
Unconditional GO TO
Unconditional GO TO passes control to the beginning of a paragraph or section in the
current program.
procedure-name
is the name of the procedure (paragraph or section) to which the process transfers
control. If no procedure-name is present, the process must execute an ALTER
statement naming the procedure before it executes the GO TO statement to set the
destination procedure-name.
Example 9-23. EXIT Statement in Nested In-Line PERFORM Statement
...
PERFORM REPORT-EXPLOSION THROUGH REPORT-EXPLOSION-END.
...
REPORT-EXPLOSION.
READ MASTER-EXP RECORD
AT END GO TO REPORT-EXPLOSION-END
END-READ
GO TO SUB-ASSY-1
SUB-ASSY-2
...
SUB-ASSY-23 DEPENDING ON SUB-ASSY OF MASTER-EXP
PERFORM REPORT-BAD-SUB-ASSEMBLY
GO TO REPORT-EXPLOSION-END.
SUB-ASSY-1.
...
SUB-ASSY-2.
...
REPORT-EXPLOSION-END.
EXIT.
Form Passes control to:
Unconditional GO TO
The beginning of a paragraph or section in the current program
Conditional GO TO
One of several procedures, depending on the value of a variable
data item
Note. The 1985 COBOL standard classifies ALTER as obsolete, so you are advised not
to use it, and therefore, not to use unconditional GO TO without procedure-name.
GO
procedure-nameTO
VST158.vsd










