COBOL Manual for TNS/E Programs (H06.03+)

Procedure Division Verbs
HP COBOL Manual for TNS/E Programs520347-003
9-73
Conditional GO TO
Usage Considerations:
Declarative and Nondeclarative Procedures
A GO TO statement in a declarative procedure (a procedure in the Declaratives
Portion of the Procedure Division) cannot refer to a nondeclarative procedure (a
procedure in the other portion of the Procedure Division). A GO TO statement in a
nondeclarative procedure cannot refer to a declarative procedure.
Debugging and Nondebugging Declarative Procedures
A GO TO statement in a debugging declarative procedure (a declarative procedure
introduced by a USE DEBUGGING statement) cannot refer to a nondebugging
declarative procedure. A GO TO statement in a nondebugging declarative
procedure cannot refer to a debugging declarative procedure.
ALTER Statement
Because the 1985 COBOL standard classifies ALTER as an obsolete element, and
because the ALTER statement can cause maintenance problems, so you are
advised not to use it. For more information, see ALTER.
Consecutive Imperative Statements in a Sentence
When a GO TO statement includes procedure-name and the paragraph
containing the GO TO statement is not referenced by an ALTER statement, the GO
TO statement can be the last of a sequence of consecutive imperative statements
within a sentence.
Conditional GO TO
Conditional GO TO passes control to one of several procedures, depending on the
value of a variable data item.
procedure-name
is the name of the procedure (paragraph or section) to which the process transfers
control, depending on the value of depend. The GO TO statement can have as
many as 255 different procedure names.
GO
DEPENDING ON
depend
procedure-name
TO
VST159.vsd