4.7.11
GO TO
The GO TO statement causes control to be transferred from one part of the
Procedure Division to another.
Format 1:
GO TO [procedure-name-l]
Format 2:
GO TO procedure-name-l [, procedure-name-2] ... ,
procedure-name-n DEPENDING ON identifier
Each procedure name is the name of a paragraph or section in the Procedure
Division. Identifier is the name of a numeric elementary item with no posi-
tions to the right of the assumed decimal point.
Whenever a format 1 GO TO statement is executed, control is transferred
to
procedure~name-=l
or to another procedure name if the GO TO statement has
been altered by an ALTER statement.
If
procedure-name-l is not specified in format 1, an ALTER statement re-
ferring
to this GO TO statement must be executed prior to the GO TO statement.
When the GO TO statement is referred
to by an ALTER statement the following
rules apply:
• GO TO statement must have a paragraph name .
• GO TO statement must be the only statement in the paragraph.
If
a format 1 GO TO statement appears in an imperative sentence, it must be
the only or last in a sequence of imperative statements.
A format 2 GO TO statement causes control to be transferred to procedure-
name-I, procedure-name-2, ... , procedure-name-n, depending on whether
the value of the identifier is 1, 2, ... , n.
If
the value of identifier is other
than a positive or unsigned integer in the range 1 to n, control passes to the
next statement.
Examples:
1.
ADD 1 TO COUNT.
2.
IF COUNT GREATER 3 GO TO CONTINUE.
3.
GO TO PRI PR2 PR3 DEPENDING ON COUNT.
60229400
4-31
Need help?
Do you have a question about the 3300 and is the answer not in the manual?