COBOL/400 Language Help
- Description
- The conditional GO TO statement transfers control to one of a series of
procedures, depending on the value of the identifier. The maximum
number of procedure-names for a conditional GO TO statement is 255.
Format 2 (Conditional GO TO)
*---------------*
V +
->->---GO-*--*--procedure-name-1*-DEPENDING--*--*-identifier--><-
*TO* *ON*
Procedure-name-1 must be a procedure or a section in the same
Procedure Division as GO TO.
Identifier must be a numeric elementary data item which is an
integer.
- If 1, control is transferred to the first statement in the procedure named
by the first occurrence of procedure-name-1;
- If 2, control is transferred to the first statement in the procedure named
by the second occurrence of procedure-name-1, and so forth.
- If the value of identifier is anything other than a value
within the range of 1 through n, (where n is the number of procedure-names
specified in this GO TO statement), no control transfer occurs.
Instead, control passes to the next statement in the normal sequence in
running the program.
[ Top of Page | Previous Page | Next Page | Table of Contents ]
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.