Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

6.2.18.2 Conditional GO TO



The conditional GO TO statement transfers control to one of a series of procedures, depending on the value of the identifier.


    ___ Format 2--Conditional ______________________________________________ 
   |                                                                        |
   |                 <__________________                                    |
   | >>__GO__ ____ ____procedure-name-1_|__DEPENDING__ ____ ______________> |
   |         |_TO_|                                   |_ON_|                |
   |                                                                        |
   | >__identifier-1_____________________________________________________>< |
   |                                                                        |
   |________________________________________________________________________|
procedure-name-1
Must be a procedure or a section in the same Procedure Division as the GO TO statement. The number of procedure-names must not exceed 255.

identifier-1
Must be a numeric elementary data item which is an integer.
X Identifier-1 cannot be a windowed date field.

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 of execution.

Previous Topic Next Topic © Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.





Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS


Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.