JUMPTO LABEL command
The JUMPTO LABEL command moves the point at which
the program resumes running to the specified label but does
not resume running the program.
- statement_label
- A valid statement label within the currently executing program or, in PL/I, a label variable.
Usage notes
- For COBOL, if a
JUMPTO LABELcommand is issued and the specified label contains an EXIT statement, the results might be unpredictable such as an ABEND because the EXIT statement might not be specified with a return location. - You can use the JUMPTO command if the SET WARNING is set to OFF
and the runtime level allows JUMPTO without compiler enablement for the following programs:
- A COBOL program compiled without hooks being inserted by the compiler and with optimization, if you compiled with the NOEJPD suboptions of the TEST compiler option
- A program compiled with Enterprise COBOL for z/OS® Version 5 or later and optimized by Automatic Binary Optimizer for z/OS
- A program compiled with Open XL C/C++ for z/OS
- When the target of the GOTO or JUMPTO command is a paragraph name or a section name (label).
- When the target of the GOTO or JUMPTO command is the first statement in the paragraph or section.
- Use the syntax of statement_label enclosed in apostrophes (') only for LangX COBOL programs. It is not supported in any other programming language.
- In PL/I, out-of-block
JUMPTOs are allowed. However, qualification might be needed. - The
LABELkeyword is optional when either the target statement_label is nonnumeric or if it is qualified (whether the actual label was nonnumeric or not). A COBOL statement_label can have either of the following forms:nameThis form can be used in COBOL for reference to a section name or for a COBOL paragraph name that is not within a section or is in only one section of the block.
name1 OF name2orname1 IN name2This form must be used for any reference to a COBOL paragraph (
name1) that is within a section (name2), if the same name also exists in other sections in the same block. You can specify eitherOForIN, but z/OS Debugger always usesOFfor output.
Either form can be prefixed with the usual block, compile unit, and load module qualifiers.
- For C, to be able to use the
JUMPTO LABELcommand, you must compile your program in one of the following ways:- With either the
PATHorALLsuboption and theSYMsuboption of theTESTcompiler option. - With either the
PATHorALLsuboption and theSYMsuboption of theDEBUGcompiler option.
JUMPTO LABELcommand. - With either the
- For C++, to be able to use the
JUMPTO LABELcommand, you must compile your program in one of the following ways:- With the
TESTcompiler option. - With either the
PATHorALLsuboption and theSYMsuboption of theDEBUGcompiler option.
JUMPTO LABELcommand. - With the
- For COBOL programs, you can use
JUMPTO LABELcommand if you compile your program with the following suboptions and compilers:- The
HOOKsuboption of theTESTcompiler option with Enterprise COBOL for z/OS, Version 4 - The
PATHorALLsuboption and theSYMsuboption of theTESTcompiler option with the following compilers:- Enterprise COBOL for z/OS and OS/390®, Version 3
- COBOL for OS/390 & VM, Version 2
- For Enterprise COBOL for z/OS Version 5, programs are always compiled without hooks inserted by the compiler. If you are using the TEST compiler option in combination with any level of the OPT compiler option, it is recommended to use the EJPD suboption of the TEST compiler option.
name, wherenameis a section name, or the name of a paragraph not within a section or in only one section of the block.name1 OF name2orname1 IN name2, wherename1is duplicated by one or more other paragraphs in one or more other sections in the block. You can use eitherOForIN, but z/OS Debugger always displaysOFin the log.
- The
- For PL/I, you can use
JUMPTO LABELonly if you compiled your program with either thePATHorALLsuboption and theSYMsuboption of theTESTcompiler option. There are no restrictions on using labels withJUMPTO LABELand label variables are supported. JUMPTO LABELis not available while debugging Enterprise PL/I programs.- You
cannot use the
JUMPTO LABELcommand while you are replaying recorded steps by using thePLAYBACKcommands. - You cannot use the
JUMPTO LABELcommand while you debug an optimized COBOL program.
Examples
- Jump to the label constant
labain blocksubain programprog1.JUMPTO prog1:>suba:>laba; - Jump to the label constant
para OF sect1. The current programming language setting is COBOL.JUMPTO LABEL para OF sect1;
Refer to the following topics for more information related to the material discussed in this topic.
- Related tasks
- IBM® z/OS Debugger User's Guide
- Related references
- statement_label
